PHP error logging checklist

Praj Basnet
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 to E_ALL ?
  • In php.ini, do you have log_errors enabled?
  • In php.ini, do you have track_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 or php.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?

--

--