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

From: Date: Tue, 09 Jun 2015 07:36:00 +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-193228@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: 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, ) ) ) ) ); Previous Comments: ------------------------------------------------------------------------ [2015-06-09 07:30:05] seyferseed at mail dot ru php 5.6.9 - the same bug OS - Ubuntu 14.10 ------------------------------------------------------------------------ [2015-01-19 11:02:16] lampacz at gmail dot com Description: ------------ Connecting to SAP https endpoint(https://sap_ip_adress:1802/long_url). After calling soap function (soapclient->function()) getting "Could not connect to host". PHP version 5.3.3-7+squeeze8 works ok PHP version 5.4, 5.6.3 doesn't work Test script: --------------- $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 )); $oSC->getInfo(); Expected result: ---------------- Result from getInfo() function Actual result: -------------- Could not connect to host ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68855&edit=1

« previous php.bugs (#193228) next »