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
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:
MUST BE VALID
Solve the problem:
14 - 12 = ?
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 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: Sun Jun 16 17:01:29 2024 UTC