How can I display and log PHP errors on IIS7?
Solution 1:
Just to double check, do you have logging set to error_reporting = E_ALL
, and display_errors = On
in your php.ini
? Usually this is enough to display these errors in IIS 7.
Next, take a look at your IIS settings, as it may be set to only show error messages locally. In the IIS 7 configuration editor this is under system.webServer->httpErrors. You will need to change errorMode to Detailed from DetailedLocalOnly. Obviously this now means anyone browsing your site will be able to see the error.
Alternatively, if you want to keep them local you can use Remote Desktop to log in to the server and run the app from there, if you can.
Solution 2:
Just wanted to add, that "existingResponse" should be set to "PassThrough". I didn't get any real error messages without that additional setting.