From:             corey at bbqguys dot com
Operating system: Windows 2000
PHP version:      5.0.2
PHP Bug Type:     CGI related
Bug description:  php://input causes hanging of web scripts

Description:
------------
When I try to access php://input from fopen or fread or file_get_contents
or any other way I can think of, the script hangs up until it times out.
It almost seems like eof is never being reached, but there is some
wierdness to that theory. If I try to dump the contents of php://input to
a log file, the log file is written with the contents of php://input, but
the next line of code is never reached. However, if I use
HTTP_RAW_POST_DATA, the next line of code is reached with blazing speed. I
am running  IIS5, win2k, php5.0.2 in CGI mode, gd2, mysql, curl, mcrypt,
and PEAR installed.

Reproduce code:
---------------
$data = fopen("php://input", "r");
while (!feof($data)) {
        $result .= fread($data, 4096);
}

OR

$data = file_get_contents("php://input");

Expected result:
----------------
$data winds up containing the contents of php://input and control is
returned to the script


-- 
Edit bug report at http://bugs.php.net/?id=30722&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30722&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=30722&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=30722&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30722&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30722&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30722&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30722&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30722&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30722&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30722&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=30722&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=30722&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30722&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30722&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30722&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30722&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30722&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30722&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30722&r=mysqlcfg

Reply via email to