php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1845 fgets() won't return in non_blocking mode
Submitted: 1999-07-23 03:30 UTC Modified: 1999-07-23 09:42 UTC
From: wico at cnh dot nl Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Beta 1 OS: linux
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-07-23 03:30 UTC] wico at cnh dot nl
Same bug as in php 3.0.11 (iss fixed in cvs 3.0.12-dev)

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 (1 < 2) {
			$out = fgets($fp, 1000);
                                          /* won't come heter until socjket closes or mamy many data is send */
			flush();
			if ($out) {
				echo "boe: '$out'<BR>\n";
				flush();
			}
		}
	}
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-23 09:42 UTC] sas at cvs dot php dot net
I've already merged in the code from php3 CVS, please try it again with Beta 2
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 11:01:32 2025 UTC