php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2180 fgets() (and probely other socket functions) won't return in non_blocking mode
Submitted: 1999-08-28 09:40 UTC Modified: 1999-08-28 09:54 UTC
From: wico at cnh dot nl Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Latest CVS (28/08/1999) OS: linux redhat 6.0
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: wico at cnh dot nl
New email:
PHP Version: OS:

 

 [1999-08-28 09:40 UTC] wico at cnh dot nl
Same bug as in php 3.0.11  (is fixed in cvs 3.0.12-dev) (should have been fixed in beta2 witch isn't :( )

test script:

	<?
		echo "plop<BR>\n"; flush();
		$fp = fsockopen("irc.net.local", 4400);

		if ($fp) {
			set_socket_blocking($fp, 0);    
			fputs($fp,"PASS :wisky\nSERVER Wico.net.local 1 932044265 932044265 J10 A 0 :plop\n");
                     
			while (TRUE) {
				$out = fgets($fp, 1000);
				/* won't come here until socket closes or many  many data is send */
				flush();
				if ($out) {
					echo "boe: '$out'<BR>\n";
					flush();
				}
			}
		}
	?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-08-28 09:54 UTC] sas at cvs dot php dot net
fixed in CVS
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Oct 11 10:00:01 2026 UTC