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>
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.
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" />
This was driving me nuts too, tryin g to bolt on some PHP Codeigniter pages to an ASP.NET site. Configuring the PHP applications subfolder as an application and running in a Classic ASP.NET Application Pool did the trick.
精彩评论