Re: [PHP] fsockopen timeout not working

2002-10-07 Thread Rasmus Lerdorf

You should read up on socket_select

On Tue, 8 Oct 2002, Scott Dowd wrote:

 I have a PHP application that goes out an checks all our servers via
 SNMP when requested. Trouble is, if the server is not available, the
 fsockopen never times out and therefore never moves onto the next
 server. I am running 4.2.3 on IIS (NT4). I read there was a bug with
 previous versions, but I have just upgraded and still seems to be a
 problem .. Script times out.

 $fp = fsockopen ($servername, 524, $errno, $errstr, 30);

 if (!$fp) {
  
 }

 else {
  
 }



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] fsockopen timeout not working

2001-02-15 Thread Richard Lynch

Isn't there a set_blocking function you have to call first?...

-- 
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message - 
From: Plamen Slavov [EMAIL PROTECTED]
Newsgroups: php.general
Sent: Wednesday, February 14, 2001 8:40 AM
Subject: [PHP] fsockopen timeout not working


 Hi all,
 Does someone know why fsockopen timeout does not work?
 php3 
 $mydata=fsockopen($machine,$port,$errno,$errstr,30);
 
 I think that this function should fail after 30
 seconds, but it just blocks the script.
 
 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail - only $35 
 a year!  http://personal.mail.yahoo.com/
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]