1) Create a .htaccess file.
2) Stop PHP errors from displaying on your website by adding the following lines to your .htaccess file.
# Do not display PHP error messages
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
3) Enable PHP error logging and specify your php_error.log by the following lines to your .htaccess file.
# enable PHP error logging
php_value error_reporting 30719
php_flag log_errors on
php_value error_log /hsphere/local/home/HOME_DIRECTORY/php_error_your_domain.log
Please ensure that the path used in 'php_value error_log' is correct, you can find this from within your
control panel under FTP/User Account > FTP User > Home Directory.
4) Create the php_error_your_domain.log file.
5) Depending on the PHP mode your site is running:
* PHP libPHP mode you will need to give this file world writeable/777 permissions using your FTP client.
* PHP FastCGI mode is recommend as you do not have to open additional permissions (FTP uploaded files
will have 644 permissions by default).
For more information on PHP and PHP modes please see Advanced PHP Configuration.
This Article was submitted by Pipe Ten Hosting - If you found it useful, please consider them as your host