ID: 16114
Updated by: [EMAIL PROTECTED]
-Summary: fputs doesn't send all data
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Feedback
Bug Type: Sockets related
Operating System: Windows 2000 AS
PHP Version: 4.1.1
New Comment:
Have you tried fflush($p) before you fclose()?
Previous Comments:
------------------------------------------------------------------------
[2002-03-16 15:16:57] [EMAIL PROTECTED]
A few months ago, I was doing transfers using socket functions, it all
worked fine(php 4.0.4 or php 4.0.5).
I code something like this:
$p = fsockopen( $url, $port );
if (!$p) die('Cannot connect');
$l = fputs( $p, $data );
fclose( $p );
With this I sent up to 5MBs to a server. Now, the web server's
administrator has upgrade to 4.1.1. The php.ini file has:
post_max_size=10M
upload_max_filesize=5M
The fact is that it works but doesn't sending large streams. I make a
test with a string of 100Kb of text, and the server received only
8Kb(and sometimes less).
I inserted a dead loop before fclose and still the server got the
client disconnection before de php_max_execution_time elapsed.
The same thing happens in php 4.0.6.
Manu.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16114&edit=1