Php – Why would I get a 500 Internal Server Error? – IIS7 – FastCgiModule with PHP

fastcgiiis-7PHP

I am getting a "500 – Internal Server Error" from the outside, the local connection gives me the 500 error as well as long with some more debugging information. The problem seems to be with FastCgiModule:

HTTP Error 500.0 - Internal Server Error
An unknown FastCGI error occured

Module  FastCgiModule
Notification    ExecuteRequestHandler
Handler PHP_via_FastCGI
Error Code  0x80070005

I ran the command to test the connection by force running cgi:

"C:\Program Files (x86)\PHP\php-cgi.exe" <path to website>

That did output the PHP/HTML code, not the 500 error. I believe the problem has to lie with the IIS. The server was up and running fine on Friday and no changes were made that I am aware of. A restart of the server changed nothing, still displays the error.

Hope I provided this to the correct website/forum. Does anybody know why I would be getting this error?

EDIT: Added in 500 error and "Unknown FastCGI error occured"

Best Answer

The 500 error may be caused because the user running C:\Program Files (x86)\PHP\php-cgi.exe doesn't have proper permissions on the directory containing your PHP files.

  1. Check the service manager to see which user is running this process.
  2. Check the security ACL for the PHP directory and files.
  3. Ensure that the user in (1.) has read/execute and list directory permissions and propagate these to all files.