#24028 [Com]: Reading raw post message by php://input
| From: | sky at abcnts dot com | Date: | Tue, 24 Jun 2003 02:03:11 +0000 |
| Subject: | #24028 [Com]: Reading raw post message by php://input | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-42397@lists.php.net to get a copy of this message | ||
ID: 24028
Comment by: sky at abcnts dot com
Reported By: xiongwei at aerafront dot com
Status: Open
Bug Type: CGI related
Operating System: win32 only
PHP Version: 4.3.2
New Comment:
Sorry for the belated response.
The sample code I sent in works on Windows 2000 Professonal 500.2195
with Service Pack 3 and successive updates installed with Apache 1.3.27
running as localhost, php-4.3.2 installed as a module and running
MySQL-3.23.49.
As well I got some much simpler examples to work.
Sky
Previous Comments:
------------------------------------------------------------------------
[2003-06-09 00:14:25] xiongwei at aerafront dot com
This is my environment.
Windows 2000 professional with service pack 3 and Cumulative Patch for
Internet Information Service (811114).
IIS 5.0
php-4.3.2-Win32.zip, using the CGI binary (php.exe) mode and set
"cgi.force_redirect = 0" in php.ini.
Thanks,
William Hong
------------------------------------------------------------------------
[2003-06-05 00:26:53] sniper@php.net
And how is PHP setup in your win32 environment then?
------------------------------------------------------------------------
[2003-06-05 00:18:07] xiongwei at aerafront dot com
I figure it out! perhaps,
No problem under linux + apache environment, but it still is a bug on
WIN32 platform.
William Hong
------------------------------------------------------------------------
[2003-06-04 22:24:32] xiongwei at aerafront dot com
I wrote a routine "postrawdata.php" for displaying HTTP raw request
message.
<?php
$putdata = fopen( "php://input" , "rb" );
while(!feof( $putdata ))
echo fread($putdata, 4096 );
fclose($putdata);
?>
It works properly when using a socket program to post something to it.
But submitting from a simple HTML below will make it dead, even http
headers were not sent back, the behavior of brwoser is just waiting
before timeout, I have tested it under IE 6.0 and Netscape 7.0 , any
suggestion is appreciate.
<body>
<form name="form1" method="post" action="postrawdata.php">
<input type="text" name="name" >
<input type="submit" name="Submit" value="Submit">
</form>
</body>
I think PHP does not send correct responding data to browser, or it
does not disconnect the HTTP channel, that makes browsers to wait ,
whereas my socket client do disconnect when finished.
Thanks,
William Hong
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24028&edit=1