Managing PHP errors

From ULYSSIS documentation
Revision as of 15:59, 25 July 2016 by Bert (talk | contribs)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

PHP errors are not displayed by default. If an error occurs, you will simply get a blank page. This is for security reasons: this way, an attacker doesn't know about possible vulnerabilities of your website. If you want to see PHP errors, you can log them to a file, or enable the display of errors.

Logging errors to a file

If your username is foobar, create a .htaccess file (for example: ~/www/.htaccess) with this content, if you are a regular user:

php_flag log_errors on
php_value error_log /home/user/foobar/php_error.log

Or if you are an organization:

php_flag log_errors on
php_value error_log /home/org/foobar/php_error.log

Displaying errors

Create a .htaccess file (for example: ~/www/.htaccess) with this content:

php_flag display_errors on