PHP errors are not showing even though php.ini is set to show them

In my php.ini file I have the following set:

error_reporting = E_ALL

I’ve also tried adding the following line to my php code:

ini_set(‘error_reporting’, ‘On’);

However, it’s still not showing error messages when I purposely put a bug into the code. Any ideas on why it’s not working? I am running PHP 5.3, which should be utilizing a separate php.ini file for each subdirectory. This test PHP page is in a subdirectory off the root.


have you check for error log on the directory the script is running on the server, some servers automatically creates a log file when there is error

Did you reboot the server after making the change to the php.ini file?

Did you edit the correct php.ini file? If you view the output of phpinfo() you’ll see a value for “Loaded Configuration File” which should be the php.ini file which PHP is using

It’s working now for some reason. Does the server need to be rebooted every time a change is made to the php.ini file?


The web server program needs to be restarted. You don’t necessarily have to reboot the whole server.