|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16326 socket_set_timeout
Submitted: 2002-03-28 07:10 UTC Modified: 2002-07-10 11:48 UTC
Avg. Score:4.5 ± 0.9
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:3 (75.0%)
From: traveler at nc dot rr dot com Assigned:
Status: Closed Package: Sockets related
PHP Version: 4.1.2 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
22 + 8 = ?
Subscribe to this entry?

 [2002-03-28 07:10 UTC] traveler at nc dot rr dot com
When using socket_set_timeout($MyVar, 2); I get an error message returned stating: "socket_set_timeout() is not supported in this PHP build".  I went to look at the help at for socket_set_timeout and it's in versions >= 4.  I'm running 4.1.2 on Windows 2000.  I read that it's a replacement for set_socket_timeout().  When using set_socket_timeout() I get a fatal error.  Here's the main part of the function that I'm using:

function query_tribes2($ip, $port) {
	$tqSocket = fsockopen("udp://$ip", $port);
	$tqSocket2 = fsockopen("udp://$ip", $port);

	if ($tqSocket && $tqSocket2) {
		$binary = pack("CCL", 14, 2, 1234);
		$binary2 = pack("CCL", 18, 2, 1234);
		socket_set_blocking($tqSocket, 0);
		socket_set_blocking($tqSocket2, 0);
		socket_set_timeout($tqSocket, 2);
		socket_set_timeout($tqSocket2, 2);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-28 08:16 UTC]
 [2002-07-10 11:48 UTC]
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at In case this was a documentation 
problem, the fix will show up soon at
In case this was a website problem, the change will show
up on the site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Aug 10 21:05:44 2022 UTC