PHP 4.0 Bug #7723: pfsockopen doesn't read more than one time

From: Date: Thu, 09 Nov 2000 14:54:35 +0000
Subject: PHP 4.0 Bug #7723: pfsockopen doesn't read more than one time
Groups: php.dev 
Request: Send a blank email to php-dev+get-37549@lists.php.net to get a copy of this message
From: vfoitzik@gmx.net Operating system: Debian/Linux 2.2.17, FreeBSD 4.1.1 PHP version: 4.0.3pl1 PHP Bug Type: Sockets related Bug description: pfsockopen doesn't read more than one time Look at the following code snippet $fh=pfsockopen('localhost', 12345, &$err_no, &$err_str, 30); fputs($fh, "GETTSTUFF\r\n"); $stuff=fgets($fh, 256); print strlen($stuff); print $stuff; Now, when I run in for the first time, everything works fine and my perl-server returns the desired value to php. When I hit reload, the connection is reused (it's really the same one, same host/port), and the server receives the request, and responses with a single line, but PHP is no longer able to read from the socket. It returns FALSE. I already tried to flush the socket or set it to non-blocking, neither works. The symptom remains the same: server gets request, replies to it, but PHP doesn't read anything. PHP was compiled as a module, as a cgi version, statically or as dso, with or without socket support, nearly all combinations have been checked out (on Debian and FreeBSD). -- Edit Bug report at: http://bugs.php.net/?id=7723&edit=1

« previous php.dev (#37549) next »