开发者

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

I am working on a PHP开发者_JAVA百科 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?


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!


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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜