Bug #68855 [Com]: Soap Could not connect to host

From: Date: Wed, 10 Jun 2015 06:39:50 +0000
Subject: Bug #68855 [Com]: Soap Could not connect to host
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193272@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68855&edit=1 ID: 68855 Comment by: seyferseed at mail dot ru Reported by: lampacz at gmail dot com Summary: Soap Could not connect to host Status: Open Type: Bug Package: SOAP related Operating System: Debian wheezy PHP Version: 5.6.4 Block user comment: N Private report: N New Comment: This is my production config for https remote air ticket service, and it is working without any cert, just with pass phrase. $soapParams = [ 'login' => $this->request['user'], 'password' => $this->request['password'], 'trace' => true, 'connection_timeout' => 10, 'default_socket_timeout' => 10, "exceptions" => true, 'soap_version' => SOAP_1_1, 'cache_wsdl' => WSDL_CACHE_NONE, 'location' => 'https://link/', "stream_context" => stream_context_create( [ 'ssl' => [ 'verify_peer' => false, 'verify_peer_name' => false, ] ] ) ]; Previous Comments: ------------------------------------------------------------------------ [2015-06-09 08:17:50] lampacz at gmail dot com http://php.net/manual/en/soapclient.soapclient.php For HTTPS client certificate authentication use local_cert and passphrase options Not possible to use without client https certificate. Certificate is without passphrase ------------------------------------------------------------------------ [2015-06-09 08:12:30] seyferseed at mail dot ru Try to update php to latest 5.6.9 version and perform debian dist-upgrade to latest libs versions. What does mean parameter 'local_cert' => 'sap.crt'? Try without it. ------------------------------------------------------------------------ [2015-06-09 08:05:18] lampacz at gmail dot com Of course tried this solution but doesn't work. $oSC = new SoapClient('sap.wsdl', array( 'local_cert' => 'sap.crt', 'location' => 'https://sap_address:8102/sap_url/1.0', 'user_agent' => 'PHP WS', 'cache_wsdl' => WSDL_CACHE_NONE, 'trace' => true, 'exceptions' => true, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS, 'soap_version' => SOAP_1_1, 'stream_context' => stream_context_create( array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, ) ) ) )); ------------------------------------------------------------------------ [2015-06-09 07:36:00] seyferseed at mail dot ru Can be fixed with this workaround. Need to add stream context param to SoapClient. $client = new SoapClient("https://IP:443/sdk/vimService.wsdl", array( "trace" => 1, "location" => "https://IP:443/sdk/", 'exceptions' => 1, "stream_context" => stream_context_create( array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, ) ) ) ) ); ------------------------------------------------------------------------ [2015-06-09 07:30:05] seyferseed at mail dot ru php 5.6.9 - the same bug OS - Ubuntu 14.10 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=68855 -- Edit this bug report at https://bugs.php.net/bug.php?id=68855&edit=1

« previous php.bugs (#193272) next »