php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7723 pfsockopen doesn't read more than one time
Submitted: 2000-11-09 09:54 UTC Modified: 2001-12-13 06:23 UTC
From: vfoitzik at gmx dot net Assigned:
Status: Closed Package: Sockets related
PHP Version: 4.0.3pl1 OS: Debian/Linux 2.2.17, FreeBSD 4.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vfoitzik at gmx dot net
New email:
PHP Version: OS:

 

 [2000-11-09 09:54 UTC] vfoitzik at gmx dot net
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).

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-21 12:05 UTC] mfischer@php.net
Can you try with latest RC and see if it works

http://www.php.net/~zeev/php-4.1.0RC3.tar.gz

Feedback.

 [2001-12-13 06:23 UTC] sander@php.net
No feedback. Closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 20:01:29 2024 UTC