Home > Backend Development > PHP Problem > How to display php iis7 500 error message

How to display php iis7 500 error message

藏色散人
Release: 2023-03-03 14:42:01
Original
3866 people have browsed it

Solution to the php iis7 500 error message: First open the "php.ini" file; then modify the content to "display_errors = on;"; then create a new "web.config" in the root directory of the php website file; finally, you can solve it according to the detailed errors.

How to display php iis7 500 error message

Recommended: "PHP Video Tutorial"

Under IIS7, PHP error is displayed (500 is not displayed Error, and detailed errors are displayed)

Mader, IIS is a trap, which made me fumble for so long before I found a solution:

1. In addition to php The .ini configuration is:

display_errors = on;
error_reporting = E_ALL & ~E_NOTICE;
Copy after login

2. Create a new web.config file under the root directory of the PHP website:

iis configuration. Note that you first need to create a new web.config file in the root directory of your website. Add web.config file:

The code is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
 
http://go.microsoft.com/fwlink/?LinkId=169433
 
  -->
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.5"/>
    <httpRuntime targetFramework="4.5"/>
  </system.web>
  <system.webServer>
    <httpErrors errorMode="DetailedLocalOnly" existingResponse="PassThrough"></httpErrors>
  </system.webServer>
</configuration>
Copy after login

The above is the detailed content of How to display php iis7 500 error message. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template