php.net |  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
Votes:4
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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: traveler at nc dot rr dot com
New email:
PHP Version: OS:

 

 [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 PHP.net 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);

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-28 08:16 UTC] sander@php.net
reclassified
 [2002-07-10 11:48 UTC] jason@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 23:01:29 2024 UTC