Skip to content
Advertisement

Where are PHP errors logged to if the error_log directive simply says “error_log”?

I ran phpinfo() and the error_log directive simply says error_log. What file is that referring to? i.e. what would the full path to the error_log be?

Advertisement

Answer

When the value simply says error_log (or error_log = error_log in your php.ini file), that means the errors will be written to a file called error_log in the same directory that the error occurs.

So, if you have a file called index.php in /home/user/public_html/ that throws an error, the error will be written to: /home/user/public_html/error_log.

If you have file called resize.php in /home/user/public_html/admin/images/ that throws an error, then the errors will be written to: /home/user/public_html/admin/images/error_log


Source: Display and log errors for PHP

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement