IIS7 + PHP + HTTP POST = hang?

匿名 (未验证) 提交于 2019-12-03 08:46:08

问题:

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>

回答1:

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.



回答2:

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" />


回答3:

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.



转载请标明出处:IIS7 + PHP + HTTP POST = hang?
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!