From: valer_crisan at yahoo dot com Operating system: Linux PHP version: 5.2.9 PHP Bug Type: SOAP related Bug description: Timeout setting is not considered on SOAP+HTTPS calls
Description: ------------ The default_socket_timeout option is not taken in consideration when making SOAP requests to a HTTPS URL. This causes big issues for us because, if the server hung for some reason, the client waits forever to get a reply back. The code works correctly when using HTTP URLs. But in our production environment we need to use HTTPS so this is not a workaround. Reproduce code: --------------- SOAP Server code: $Server = new SoapServer('ed.wsdl'); $Server->setClass('Ed'); $Server->handle(); class Ed{ public function hello($Input){ sleep(30); return array('goodbye' => "Goodbye " . $Input->firstname); } } SOAP client code: echo "Start time: " . date('c') . "\n"; ini_set('soap.wsdl_cache_enabled', 0); ini_set('default_socket_timeout', 5); $Binding = new SoapClient('ed.wsdl', array('trace' => 1)); try { $Return = $Binding->hello(array('firstname' => 'john')); echo "Response: "; print_r($Return); } catch( Exception $e ) { echo "Exception: "; print_r($e); } echo "End time: " . date('c') . "\n"; Let me know if you need the wsdl file as well. Expected result: ---------------- I expect a SOAP timeout exception to be thrown. Actual result: -------------- The client gets the server response after 30 seconds, as shown here: Start time: 2009-06-10T11:58:30-07:00 Response: stdClass Object ( [goodbye] => Goodbye john ) End time: 2009-06-10T11:59:00-07:00 -- Edit bug report at http://bugs.php.net/?id=48524&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48524&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48524&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48524&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48524&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48524&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48524&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48524&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48524&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48524&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48524&r=support Expected behavior: http://bugs.php.net/fix.php?id=48524&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48524&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48524&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48524&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48524&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48524&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48524&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48524&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48524&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48524&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48524&r=mysqlcfg