Bug #15091 Updated: socket_set_timeout not part of windows binary

From: Date: Wed, 10 Jul 2002 15:47:13 +0000
Subject: Bug #15091 Updated: socket_set_timeout not part of windows binary
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-13743@lists.php.net to get a copy of this message
ID: 15091 Updated by: jason@php.net Reported By: Rajkumar.Bellan@saint-gobain.com -Status: Open +Status: Closed Bug Type: Sockets related Operating System: windows 2000 PHP Version: 4.1.1 New Comment: This bug has been fixed in CVS. You can grab a snapshot of the CVS version at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-01-20 14:09:10] jjkil@hotmail.com PHP version: 4.1.1 Windows XP using IIS Installed from the executable download. Using the set_socket_timeout method causes the following error message to appear in the browser: Warning: socket_set_timeout() is not supported in this PHP build in c:\inetpub\wwwroot\test.php on line 26 ------------------------------------------------------------------------ [2002-01-18 10:10:22] Rajkumar.Bellan@saint-gobain.com correction that was a typo on my part. I did use fsockopen. The program is working fine as long as there is data coming from the other side. But if there is no data the fgets call waits indefinitely without timing out. That is the reason I tried to use socket_set_timeout. Unfortunately i get the message that socket_set_timeout is not part of windows build. ------------------------------------------------------------------------ [2002-01-18 10:04:14] sander@php.net Why are you using $fsockopen and not fsockopen? That might be the cause of this bug. ------------------------------------------------------------------------ [2002-01-17 18:32:04] Rajkumar.Bellan@saint-gobain.com Correction to my earlier report. When using socket_set_blocking($fp, false) I am "not" getting data every one second ------------------------------------------------------------------------ [2002-01-17 18:28:21] Rajkumar.Bellan@saint-gobain.com I am using windows binaries. $fp = $fsockopen(($ip_addr, $port_no, $errno, $errstr, 30); do { if (!feof($fp)) { $livedata = trim(fgets($fp,128)); echo $livedata."\n"; } else { break; } } while(true); when there is no data being sent by the server my script waits indefinitely at fgets. I tried using socket_set_blocking($fp, false) but that does get me data every one second. I tried to use socket_set_timeout that is when I found out it is not supported in windows binaries. Is there any other way to solve this problem in windows. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15091&edit=1

« previous php.bugs (#13743) next »