RE: [SOAP] Timeout issue-does not work even when timeout is set

From: Date: Mon, 08 Mar 2004 18:27:25 +0000
Subject: RE: [SOAP] Timeout issue-does not work even when timeout is set
Groups: php.soap 
Request: Send a blank email to php-soap+get-1419@lists.php.net to get a copy of this message
Curl is the http library used by PEAR SOAP when making http or https requests. However, after looking at the HTTP.php class again, it appears that curl is used *only* for https requests. For http requests, it uses straight socket calls. So, if I'm reading the code correctly, to set the timeout with HTTPS requests, you'd say: $client->setOpt('curl','timeout',$myTimeout); but for HTTP requests, you'd say: $client->setOpt('timeout',$myTimeout); In version 0.8R3, see HTTP.php line 587 for the curl option setting, and line 500 for the http timeout setting. dave -----Original Message----- From: Ai Leen Tan [mailto:tan_ai_leen9@hotmail.com] Sent: Monday, March 08, 2004 5:08 AM To: mikeatwork@ukonline.co.uk; soap@lists.php.net Subject: RE: [SOAP] Timeout issue-does not work even when timeout is set Oh I instantiated the soap client as $client. So the setOpt is referring to the SOAP timeout option. What is Curl by the way? It seems like a lot of people are using it with PEAR SOAP. But I have never used it. Regards, Tan Ai Leen ----Original Message Follows---- From: "Mike Carter" <mikeatwork@ukonline.co.uk> Reply-To: <mikeatwork@ukonline.co.uk> To: "'Tan Ai Leen'" <tan_ai_leen9@hotmail.com>,<soap@lists.php.net> Subject: RE: [SOAP] Timeout issue-does not work even when timeout is set Date: Mon, 8 Mar 2004 09:35:53 -0000 > -----Original Message----- > From: Tan Ai Leen [mailto:tan_ai_leen9@hotmail.com] > Sent: 07 March 2004 07:18 > > There is this timeout variable for HTTP class that pear soap > is using. > I set the timeout to be 0 which the comments in HTTP class say means > never, like this: > $client->setOpt("timeout", 0); > > Not sure if it will work... cos the timeout could be cause by the OS, > firewall, etc. As I am not good with network infrastructure, can't > confirm anything. > > But you can try to configure the timeout for SOAP using the > above function. > > Tell me if it works for you. Don't you need to use the SOAP timeout option? I also found I needed to set the CURL timeout as well... $this->setOpt('curl', CURLOPT_TIMEOUT, $GLOBALS['g_ps']['connectionTimeout']); $this->setOpt('timeout', $GLOBALS['g_ps']['connectionTimeout']); $GLOBALS['g_ps']['connectionTimeout'] being my special timeout value ;-) Regards, Mike C. ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ _________________________________________________________________ Get MSN Hotmail alerts on your mobile. http://en-asiasms.mobile.msn.com/ac.aspx?cid=1002 -- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.soap (#1419) next »