Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS7 + PHP + HTTP POST = hang?

I installed PHP on a Windows 7 x64 machine with IIS7 via Windows Web App Gallery. Everything seemed to go fine, and a simple phpinfo() page works like you would think. However, whenever I do a POST request to a PHP page, the request just hangs forever. See the very simple test page below... It doesn't even have any dynamic content in it.

I've wasted way 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>
like image 227
kodbuse Avatar asked Dec 05 '10 06:12

kodbuse


2 Answers

I had this same problem. Any PHP POST to another PHP page was hanging. In the process of rebuilding the web.config file from scratch, I found an error message that suggested running the AppPool Managed pipeline mode in Classic mode.

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

like image 58
breese Avatar answered Nov 02 '22 02:11

breese


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

<trace enabled="true" localOnly="false" pageOutput="false" requestLimit="40" />
like image 29
kodbuse Avatar answered Nov 02 '22 01:11

kodbuse