How to configure my server to display php error instead on HTTP Error 500 (Internal Server Error)

StackOverflow https://stackoverflow.com/questions/15509372

Domanda

I have a local server set up on Windows server 2008 R2. But whenever I have an error in PHP or MySql code I get a HTTP 500 Inertnal Sever Error insted on displaying what the error is.

How can I change my server configuration to display the actual error like any other server?

I have tried adding this to my php file

error_reporting(E_ALL);
ini_set('display_errors', 'On');

here is some info in my php.ini file

error_reporting  =  E_ALL & ~E_NOTICE
display_errors = On
display_startup_errors = On

Thanks

È stato utile?

Soluzione

Did you recycle the application pool to apply the changes to php.ini? Restarting IIS doesn't actually reload php.ini, even though you'd think it would. I would also create a phpinfo file to verify the error reporting ini settings on the server have been applied.

Instructions for recycling the application pool: http://technet.microsoft.com/en-us/library/cc770764(WS.10).aspx

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top