Managing PHP errors

From ULYSSIS documentation
Revision as of 16:13, 28 August 2019 by Bert (talk | contribs)

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