php.net |  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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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:

<?
set_time_limit(0);
[socket]
[connect 0.0.0.0 port foo]
[send info]
[recieve info]
[send instructions] 
echo "beginning reception.\n";
while (1){
      read($net_fd,$net_buf,2048);
      echo $net_buf;
}
[close]
?>

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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] sterling@php.net
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] ronabop@php.net
reopened.
 [2001-06-02 21:02 UTC] sniper@php.net
This should be fixed with PHP 4.0.6, please try the 
latest release candidate:

http://www.php.net/~andi/php-4.0.6RC2.tar.gz

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

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

-Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 21:01:28 2024 UTC