I'm testing PHP on a LAMP server running in a Linux virtual machine. Following this post, I placed the following at the beginning of my PHP script to enable error reporting:
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);
I also tried enabling error reporting in the php.ini file as described here:
display_errors = On
display_startup_errors = On
error_reporting = -1
However, I still get a 500 Internal Server Error in Chrome's debugger, rather than a proper error message:
The actual error message, as found in /var/log/apache2/error.log
, is:
PHP Parse error: syntax error, unexpected '$userID' (T_VARIABLE) in /path/to/file
How can I properly enable error reporting within Chrome?