I am trying to get my install of PHP under IIS to display errors, but I'm having no luck at all. I tried
error_reporting(E_ALL);
in the script, and nothing shows up, just a blank screen.
I tried editing my PHP.ini file and setting
error_reporting = E_ALL
display_errors = On
Also tried
error_reporting = E_ALL
display_errors = stdout
but nothing is showing up on the screen at all when my scripts throw errors.
Any advice?
Ensure that you're editing the PHP file in the correct location; IIS can look for a php.ini file in C:\WINDOWS rather than the install location of the PHP ISAPI or CGI module. Check the output of phpinfo(); to determine you're editing the correct php.ini file. Also, you need to restart the IIS service (or the computer overall) before those changes will be put into effect.
Sorry to resurrect a dead post but I had a similar issue and solved it by doing this in my PHP code:
ini_set('display_errors',1);
error_reporting(E_ALL);
This obviated the need to edit the server config and also allowed me to do this in just the method that I thought was problematic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With