Date: 01/30/01
- Next message: sniper <email protected>: "[PHP-DEV] PHP 4.0 Bug #8734 Updated: Unable to send large emails, causes a GPF - small email work fine."
- Previous message: sniper <email protected>: "[PHP-DEV] PHP 4.0 Bug #5480 Updated: set_socket_blocking($fp, False) don't work !"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 6200
Updated by: sniper
Reported By: kh.wild <email protected>
Status: Open
Old-Bug Type: Misbehaving function
Bug Type: Sockets related
Assigned To:
Comments:
reclassify
Previous Comments:
---------------------------------------------------------------------------
[2000-08-17 04:42:03] kh.wild <email protected>
I have to communicate with a perl daemon that gives me an hash when I connect
the port. After that I have to complete the data with this hash an send it in the
same connection back to the daemon.
What I have todo is a fgets for the first string and after sending the comleted data
with an fputs. The daemons never receive my data's after the fputs.
I tried the newest snap to use the fflush. But this didn't solve the problem.
---------------------------------------------------------------------------
[2000-08-16 14:10:33] derick <email protected>
that's a nice piece of code, but totally useless. COuld you clarify it bit more?
---------------------------------------------------------------------------
[2000-08-16 14:02:57] kh.wild <email protected>
$fd = fsockopen( $server, $port, &$errno, &$errstr );
if( ! $fd ) {
print( "Couldn't connect to $server, errno: $errno, errstr: $errstr<br>n" );
exit;
}
set_socket_blocking( $fd, false );
$ret = '';
while( ! feof( $fd ) )
{
$ret .= fgets( $fd, 128 );
}
if( trim( $ret ) <> '' ) {
$key = strip_crlf( $ret );
} else {
print( "Couldn't get key<br>n" );
exit;
}
print( "got key: ---$key---<br>n" );
$hash = md5( "$passwd.$key" );
$tmp = "$serviceid:$username:$hash";
fputs( $fd, "$tmpn", strlen( $tmp ) + 1 );
fflush( $fd );
$ret = '';
while( ! feof( $fd ) )
{
$r = fgets( $fd, 128 );
print( "-" . $r . "-" );
$ret .= $r;
}
print( "received id: $ret<br>n" );
fclose( $fd );
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=6200
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: sniper <email protected>: "[PHP-DEV] PHP 4.0 Bug #8734 Updated: Unable to send large emails, causes a GPF - small email work fine."
- Previous message: sniper <email protected>: "[PHP-DEV] PHP 4.0 Bug #5480 Updated: set_socket_blocking($fp, False) don't work !"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

