PHP error logging checklist

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 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?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store