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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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 15:00:01 2026 UTC