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




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Learn more about vulnerability alerts

What to Look for in a Coding Bootcamp

Pushed To The Limit

How to Add Google Calendar Events from Your Contact Form


Cloud Computing: A Walkthrough

REST API with Node.js?

(Part 3/3) Create your own end-to-end IoT pipeline on GCP for free

Serverless architecture with AWS

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
Praj Basnet

Praj Basnet

More from Medium

Using Laravel events in unit tests

Let’s Take Out the Trash: Writing Cleaner Code

PHP for Beginners: Loops

How to connect PHP application to MSSQL, setup on 2 different servers.