How to get your own PHP error log via .htaccess

How to get your own PHP error log via .htaccess

I would like to get my own PHP error log, how can I do this?

===========================================



If you don't have a .htaccess file, create it it using the file manager
or a regular text editor on your computer and upload that file using
ftp. Just make sure that the file name on the server is .htaccess. If
you already have an .htaccess file, then add the directives below to
that file.





First you'll want to hide PHP errors from visitors by adding this to your .htaccess:



# supress php errors

php_flag display_startup_errors off

php_flag display_errors off

php_flag html_errors off



With that in place, PHP errors will no longer be displayed publicly on your site. It hides the e

Add the following directive to a .htaccess file.



Next, enable private PHP error log by adding the following to your .htaccess:



# enable PHP error logging

php_value error_reporting 30719

php_flag log_errors on

php_value error_log /hsphere/local/home/YOUR_USER_HERE/php_error.log





Ensure that the path matches your home directory path. You can find it in your control panel under FTP User.



Next, create the php_error.log and make sure to give it world writing
(change permissions to 777 for the file name php_error.log). As this
file is out side the web directory file and not an executeable file, it
is relatively safe to do so.