Solution process for PHP unable to receive POST data under IIS

Problem status description:

1. Tried switching the PHP version and restarting the IIS service. The results are invalid.

2. When using PHP versions 5.4 and 5.5, the program will time out as soon as the POST data is submitted. 5.6 does not time out but POST prints empty data.

3. I reinstalled PHP during the process and it still didn’t work.

4.asp.net can access post data normally. The asp.net program is also running on the server.

5. The asp program is also unable to obtain post data and reports an error as soon as the post data is submitted.

6. This server has been running for half a year and has never had any problems. PHP suddenly cannot receive POST data.

7. It has been verified that the same ASP and PHP programs run normally in other windows servers.

Problem conclusion analysis:

1. Asp.net can run normally and can receive post data, which means that iis can receive POST.

2. Neither asp nor PHP can receive post data, and reinstallation and restarting are ineffective, indicating that there is no problem with asp and PHP themselves.

3. In summary, there is a problem between iis and php or asp. This configuration or mapping method is set on IIS.

4. Comprehensive analysis, the final question is about IIS configuration.

Elimination method to solve the problem:

Solution 1. Reinstall IIS. This risk is too high. The server needs to be reconfigured for more than 10 sites.

Option 2. Find the problem by changing some environment configurations of IIS. preferred

The problem was finally solved:

The "Option 2" problem is solved by adjusting the "Hosted Pipeline Mode" to "Classic". (POST of php and asp are normal)

The following is the setting in the pagoda:

 The following are the settings on the "IIS server"

Summary of technical points (managed pipeline mode):

Classic mode:

Personal easy-to-understand point of view: It can be regarded as an old version of the model, which was used more in the early days. The compatibility is relatively good, but the scalability is relatively poor. This mode can be used when using asp and PHP. First, there are not many expansions of asp itself, and second, PHP itself expands itself.

Integrated mode:

Personal easy-to-understand point of view: ASP.NET recommends using this mode, because ASP.NET itself is very powerful and has many expansion functions. ASP.NET is a new technology, which can be understood as "asp.net" and "integrated mode". They are considered "simultaneous" "Product of the period". Born to meet powerful functions and powerful expansion.

Guess you like

Origin blog.csdn.net/weixin_39434806/article/details/132033930