How to fix 500 Internal Server Error on PHP?


Sometimes, when you install a php into IIS7 and try to execute phpinfo() script you can get an HTTP 500 Internal Server Error message. The following error normally cause by many reasons but after installation of PHP then the error comes out, it should be due to the FastCGI issue. To check on the reason why you receive the following error, you may disable error message on your page.

If you face this problem after installation of PHP,  you may have to change default error handling for FastCGI in IIS7.

How to fix 500 Internal Server Error on PHP?

Start IIS Manager
1. Click on <server name> and then in the right pane go to “FastCGI Settings”.
2. Right click on php-cgi.exe file and choose “Edit…”.
Set the “Standard error mode” option to “IgnoreAndReturn200” value.
3. Click OK and close IIS Manager.
After performing mentioned steps you shall no longer see HTTP 500 error messages in the browser. Please clear the browser cache.

Comments