Solution to the problem that PHP cannot display the error message in IIS environment: 1. Change the PHP configuration file [php.ini]; 2. Create a new [web.config] file under the root directory of the website and add Corresponding code; 3. Install the component [VCRUNTIME140.dll].
Solution to PHP failing to display error message in IIS environment:
1.PHP
First open the PHP configuration file php.ini and make the following configuration changes:
log_errors = On
html_errors = On
display_errors = On
fastcgi.logging = 0
Related learning recommendations:can be modified according to your own needs
2.Web site
<?xml version="1.0" encoding="UTF-8"?> <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>
3. Run cmd to enter the directory, and when executing PHP, a pop-up window will prompt: Unable to start this program because VCRUNTIME140.dll is missing from your computer.
The above is the detailed content of What should I do if PHP cannot display error messages in IIS environment?. For more information, please follow other related articles on the PHP Chinese website!