ID: 16114
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Sockets related
Operating System: Windows 2000 AS
PHP Version: 4.1.1
New Comment:
I did also a test(without chunking the data), I could send 48653 bytes,
but couldn't 49229 bytes.
With the chunking feature it must be some bug in my code, cause didn't
work with 48653 bytes.
Manu.
Previous Comments:
------------------------------------------------------------------------
[2002-03-25 15:42:42] [EMAIL PROTECTED]
I did something like this. Didn't work.
$socket = fsockopen( $host, $port, $err1, $err2, 30 );
if (!$socket) die ('conn');
$start = 0;
$len = 4*1024;
$result = 0;
while ($result < strlen($request))
{
$chunk = substr( $request, $start, $start+$len );
$result = $result + fputs( $socket, $chunk );
fflush( $socket );
$start = $start+$len;
}
fclose( $socket );
Hope you find the answer. :->
Manu.
------------------------------------------------------------------------
[2002-03-25 14:14:36] [EMAIL PROTECTED]
Could you try sending the data in smaller chunks that are
< 8KB each?
I think I might have a solution.
--Wez.
------------------------------------------------------------------------
[2002-03-25 13:16:49] [EMAIL PROTECTED]
I did once I received your reply. It didn't work either.
Manu.
------------------------------------------------------------------------
[2002-03-16 20:39:21] [EMAIL PROTECTED]
Have you tried fflush($p) before you fclose()?
------------------------------------------------------------------------
[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