IIS7 + PHP + HTTP POST = hang?

I installed PHP on a Windows 7 x64 machine with IIS7 through the Windows web application gallery. Everything seemed to be all right, and a simple phpinfo () page works the way you think. However, whenever I execute a POST request to a PHP page, the request just hangs forever. See a very simple test page below ... It doesn’t even have dynamic content.

I spent too much time on this. Any ideas? Thanks a bunch!

page.php:

<html> <body> <form action="page.php" method="post"> <textarea name="apa"></textarea> <input type="submit" value="ok" /> </form> </body> </html> 

Handler mapping:

 <handlers> <add name="PHP_via_FastCGI" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\php-cgi.exe" resourceType="Either" requireAccess="Script" /> </handlers> 
+6
windows php iis iis-7
source share
3 answers

After much troubleshooting, it turned out that this line in my web.config file was causing the problem:

 <trace enabled="true" localOnly="false" pageOutput="false" requestLimit="40" /> 
+2
source

I had the same problem. Any PHP request to another PHP page would freeze. In the process of recovering the web.config file from scratch, I found an error message that suggested launching AppPool Managed Pipeline mode in classic mode.

After making the above change, my PHP code is working properly.

+4
source

This also made me think about trying to pin some PHP Codeigniter pages to ASP.NET. Setting up the PHP application subfolder as an application and working in the classic ASP.NET application pool did the trick.

0
source

All Articles