Friday, November 5, 2010

Displaying PHP Errors on Ubuntu

Default configuration of PHP 5.3 / Apache 2.2 installation on Ubuntu 10.10 Maverick Meerkat does not display any syntax errors and simply throws an Internal Server Error (HTTP Error 500).

How to enable display/output of PHP 5 error messages :
  1. Edit /etc/php5/apache2/php.ini
  2. Set the following configuration values:

    display_errors = on
    display_startup_errors = on
    html_errors = on

  3. The default error_reporting threshold is :

    error_reporting = E_ALL & ~E_DEPRECATED

    which should be enough. But you can change it if you want.


No comments:

Post a Comment