The following script is not outputting error messages to the browser. Instead it results in an HTTP Error 500 response.

ini_set('display_errors', 'On');


echo "test" asdf // This should error

Ideas? This is a basic php5/apache2 install on ubuntu. httpd.conf is blank, no .htaccess file.

The error.log file displays the error message:

syntax error, unexpected T_STRING, expecting ',' or ';'

which is correct.


If the script has a parse error that prevents it from running, this also prevents it from changing a PHP setting.

  • So the solution is to just turn on errors via the ini files. This error is fatal. – EmpireJones Mar 10 '11 at 5:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.