|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8028 Socket read failure
Submitted: 2000-11-29 04:54 UTC Modified: 2001-06-02 21:02 UTC
From: telastyn at ideology dot com Assigned:
Status: Closed Package: Sockets related
PHP Version: 4.0.3pl1 OS: NetBSD
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.
Block user comment
Status: Assign to:
Bug Type:
From: telastyn at ideology dot com
New email:
PHP Version: OS:


 [2000-11-29 04:54 UTC] telastyn at ideology dot com
Using 2 NetBSD 1.4.2 machines running PHP4.0.2 and 4.0.3pl1 respectively are running the same script which looks like this:

[connect port foo]
[send info]
[recieve info]
[send instructions] 
echo "beginning reception.\n";
while (1){
      echo $net_buf;

I acknowledge the ugliness of such code, it should yet be functional. In PHP 4.0.2 it works as expected, recieving all information back, and echoing to html or console (was tested on console). In PHP 4.0.3pl1 it recieves no information at the actual code portion listed above. It returns no error, but reads no information.

The service was tested with plain ol' telnet and with a c program, neither of which had any difficulty on either machine. Both PHP's are compiled with sockets enabled. Also works on RedHat 7.0 PHP 4.0.2.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-29 20:25 UTC] telastyn at ideology dot com
Compiled PHP 4.0.2 on the 4.0.3pl1 machine and the scripts run correctly.
 [2000-12-12 05:53 UTC]
Closed since user reports it works correctly.
 [2000-12-13 00:35 UTC] telastyn at ideology dot com
Not correct. 

Bug non-existant on PHP4.0.2, bug continues to exist in PHP4.0.3pl1.
 [2000-12-13 01:10 UTC]
 [2001-06-02 21:02 UTC]
This should be fixed with PHP 4.0.6, please try the 
latest release candidate:

And you should also be using the 4th (undocumented still)
paramater for read():

read($net_fd, $net_buf, 2048, PHP_READ_BINARY)


PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Dec 02 03:01:27 2023 UTC