How do I enable PHP error logging?

To enable PHP error logging, simply add the following lines to your website's main .htaccess file:

php_flag log_errors on
php_value error_log /var/www/vhtdocs/userwebXXXXX/php_error_log

Replace userwebXXXXX with your FTP user ID.

You can also use a different name to error_log for the filename. For example, if you have more than one website, you could use:

php_value error_log /var/www/vhtdocs/userwebXXXXX/websitename_php_error_log

  • Email, SSL
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I disable the server RAM cache during website development?

The web servers are installed with a RAM cache to help speed up your website. The caching...

How do I enable PHP short tags?

PHP short tags description from the official PHP documentation: When PHP parses a file, it looks...

How to set core PHP directives (e.g. upload_max_filesize)

Some PHP scripts may require settings different from the defaults configured in the server's...