Problems with https vs http on soap request
[email protected] ("Don O'Neil") Tue, 2 Feb 2016 10:22:20 -0800
| Newsgroups | php.soap |
|---|---|
| Message-ID | <[email protected]> |
------=_NextPart_000_01E9_01D15DA3.9B3B4420
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
I'm having issues with a simple soap testing script working;
<?php
$client = new SoapClient('https://ws.cdyne.com/ip2geo/ip2geo.asmx?wsdl');
$blah = $client->__getFunctions();
var_dump($blah);
?>
This works FINE when the url us just http:// instead of https://.
I'm running PHP 5.6.17 on CENTOS 6.6 with soap and SSL is enabled:
# php -i | grep -i ssl
SSL => Yes
SSL Version => OpenSSL/1.0.1e
core SSL => supported
extended SSL => supported
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.0.1e-fips 11 Feb 2013
OpenSSL Header Version => OpenSSL 1.0.1e-fips 11 Feb 2013
Openssl default config => /etc/pki/tls/openssl.cnf
openssl.cafile => no value => no value
openssl.capath => no value => no value
Native OpenSSL support => enabled
The error message I'm getting is:
[Tue Feb 02 10:08:21.849115 2016] [:error] [pid 30540] [client
24.253.114.192:56070] PHP Fatal error: Uncaught SoapFault exception: [WSDL]
SOAP-ERROR: Parsing WSDL: Couldn't load from
'https://ws.cdyne.com/ip2geo/ip2geo.asmx?wsdl' : failed to load external
entity "https://ws.cdyne.com/ip2geo/ip2geo.asmx?wsdl"\n in
/home/uswing00/domains/uswingnuts.com/public_html/store/test-ssl.php:2\nStac
k trace:\n#0
/home/uswing00/domains/uswingnuts.com/public_html/store/test-ssl.php(2):
SoapClient->SoapClient('https://ws.cdyn...')\n#1 {main}\n thrown in
/home/uswing00/domains/uswingnuts.com/public_html/store/test-ssl.php on line
2
Any ideas on how to resolve this? I've verified that all the appropriate
options are defined in the php.ini file to enable soap. The php build itself
was part of the distro for DirectAdmin, so it was built with the soap
module.
I haven't done anything 'special' to configure OpenSSL, not sure if I have
to create a cert, or point to my server's public cert, or what to get the
soap ssl request to work. Apache already has the certs location defined and
it works fine.
I've spent several hours googling to no avail. Any help would be
appreciated.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
------=_NextPart_000_01E9_01D15DA3.9B3B4420--