------------------------------------------------------------------------------- PHP Error Handling Look at the guide http://php.net/manual/en/book.errorfunc.php Development Server Setup... I have enabled the following in the "php.ini" file for the system PHP configuration. display_errors = On display_startup_errors = On log_errors = Off This means PHP script should now report errors with the HTML output. This is good for development, though it is not really recommended for production environments. The "Examples" section in the above also contains a larger error handler sub-routine. And outputting program errors to the error log using the error_log() function. Redirect errors to a log file However these settings and others given in the above manual, can be set in user scripts to specify the filename into which errors should be logged using the ini_set() function. Thus something like this is recommended to be added to any and all user PHP scripts, to define where run-time errors should be sent for that script. ini_set('error_log', '/tmp/script_errors.log'); ini_set('log_errors', 'On'); ini_set('display_errors', 'Off'); Note the file "script_errors.log" may need a full path, and should be writable by the Apache web server user. That is it should exist with permissions 701 (writable by others) You also should think about preventing that file 'growing forever' over long periods of time. For example truncating or rolling the errors log appropriatally at the start of each run. This error log redirection will not help with compile-time errors, but the previous system setup however will at least report such problems, until the users scripts own ini_set() commands can be executed. Redirect to Display This is similar to the above but adds some but you need to provide some error wrapping ini_set('log_errors', 'Off'); ini_set('display_errors', 'On'); ini_set('error_prepend_string', "\n
\n");
ini_set('error_append_string', "\n\n");
header("Content-type: text/html");
...
-------------------------------------------------------------------------------