Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

<?php
error_reporting(E_ALL);
ini_set('display_errors', 'On');

phpinfo();

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.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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