#39188 [Fbk->Opn]: reading php://input hangs with IIS
| From: | php at nineberry dot de | Date: | Wed, 18 Oct 2006 19:19:02 +0000 |
| Subject: | #39188 [Fbk->Opn]: reading php://input hangs with IIS | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-103682@lists.php.net to get a copy of this message | ||
ID: 39188
User updated by: php at nineberry dot de
Reported By: php at nineberry dot de
-Status: Feedback
+Status: Open
Bug Type: IIS related
Operating System: Win32
PHP Version: 5.1.6
New Comment:
Can't test. Can't access server but by FTP.
Previous Comments:
------------------------------------------------------------------------
[2006-10-18 19:10:29] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
------------------------------------------------------------------------
[2006-10-18 19:01:28] php at nineberry dot de
Description:
------------
Posting to a php script makes the script hang reading from php://input
on a server with IIS 6.0 / CGI
Code works fine on Apache both on Linux and Win32.
Code also works as expected, when "text/plain" is used as enctype in
the HTML Form.
Maybe related to #38488 ?
Maybe stdin is not opened as binary any longer?
Reproduce code:
---------------
HTML Form:
<html>
<body>
<form method="POST" action="1.php">
<input type="hidden" name="test" value="yyyy">
<input type="submit">
</form>
</body>
</html>
PHP Code in 1.php:
<?php
// Read 1 char
$f = fopen('php://input', 'rb');
$inpData = fread($f, 1);
fclose ($f);
echo($inpData);
echo("Done");
?>
Expected result:
----------------
Expected Output:
tDone
Actual result:
--------------
Constantly loading, CGI timeout after some minutes.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39188&edit=1