10

I am working on a PHP application using IIS Express/Web Matrix and it is giving me the "friendly" error page instead of the actual error. How do I configure my site or IIS express to give me the actual error?

Matthew Groves
  • 25,181
  • 9
  • 71
  • 121
Dean
  • 1,550
  • 2
  • 15
  • 22

2 Answers2

18

I know this is an oldish question but I had the same problem recently so I thought I would share how I got it working.

I just edited the php.ini file located at "C:\Program Files (x86)\IIS Express\PHP\v5.3" on my machine and change the line

display_errors = Off

to

display_errors = On

I also set

display_startup_errors = On

as well just to make sure.

Also if you right click the Web Matrix icon in the system tray and click "Show All Applications" then select your site there is a link the the applicationHost.config file that it uses so you can change settings in there.

Hope this helps some people!

Richard Adnams
  • 3,128
  • 2
  • 22
  • 30
4

If you've followed the advice of Mr. Adnams and still aren't seeing your own output for 403 and 500 errors, try adding an errorMode="Detailed" attribute to the httpErrors element within the web.config file found in your web root folder. If you don't already have a web.config file, start with this:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <httpErrors errorMode="Detailed" />
  </system.webServer>
</configuration>
Community
  • 1
  • 1
rymo
  • 3,285
  • 2
  • 36
  • 40