PHP error logging checklist
Nov 26, 2020
Here’s a list of things you can check if you aren’t getting anything written to the PHP error log on your server:
- In
php.ini
, do you have error_reporting set toE_ALL
? - In
php.ini
, do you havelog_errors
enabled? - In
php.ini
, do you havetrack_errors
enabled? - Have you specified a valid file / location for
error_log
- Does the user that starts PHP (e.g apache) have relevant permissions and ownership to write to the PHP
error_log
file ? - Does your application have an override set in
.htaccess
orphp.ini
for any of the above? - Have you restarted PHP/Apache after making changes for these things to take effect?
- What does
php -i | grep error
tell you regarding these settings?