Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

500 Error With PHP and Webmatrix Shows "Friendly" Error Page

Tags:

php

iis

webmatrix

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?

like image 668
Dean Avatar asked Sep 17 '11 20:09

Dean


2 Answers

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!

like image 155
Richard Adnams Avatar answered Oct 27 '22 05:10

Richard Adnams


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>
like image 21
rymo Avatar answered Oct 27 '22 07:10

rymo