Bug #68017 [NEW]: SoapServer fails to load local wsdl when using ssl
From: dallas at ekkysoftware dot com
Operating system: CentOS
PHP version: 5.5.16
Package: OpenSSL related
Bug Type: Bug
Bug description:SoapServer fails to load local wsdl when using ssl
Description:
------------
When connecting to a soapclient to a soapserver via ssl. Everything
works correctly when over http, but when moving to https it all fails.
It was working when the ssl certificate/host was the default and did not
require a SNI. Additionally if we flip the wsdl on the server side to
http, then the client can connect sometimes - intermittent.
wget and curl are both able to access the wsdl via https and I can copy
the wsdl to a local file and the SoapServer will still not load from a
local file.
Server is setup as a virtual host where the host is not the default.
When it was the default, the soap connection work correctly via https.
Best guess is something is connection over ssl with ip 127.0.0.1,
without an SNI and is getting the wrong certificate, preventing
successful connection.
Test script:
---------------
I have tried all the options such as:
$context = stream_context_create(array(
'ssl' => array('SNI_server_name' => parse_url($this->_wsdl,
PHP_URL_HOST),'SNI_enabled' => TRUE,
'peer_name' => parse_url($this->_wsdl, PHP_URL_HOST),'verify_peer'
=>
false, 'allow_self_signed' => true),
));
$options['stream_context'] = $context;
$options['ssl'] = array('ciphers'=> "SHA1",'verify_peer'
=> false,
'allow_self_signed' => true,
'peer_name' => parse_url($this->_wsdl,
PHP_URL_HOST),'curl_verify_ssl_peer'=>false,'curl_verify_ssl_host' =>
false);
$options['https'] = array('ciphers'=>
"SHA1",'verify_peer' => false,
'allow_self_signed' => true,
'peer_name' => parse_url($this->_wsdl,
PHP_URL_HOST),'curl_verify_ssl_peer'=>false,'curl_verify_ssl_host' =>
false);
$server = new SoapServer($this->_wsdl,$options);
Actual result:
--------------
[13-Sep-2014 07:47:57 UTC] PHP Warning: SoapServer::SoapServer(): SSL:
Success in /home/plaza/public_html/lib/Zend/Soap/Server.php on line 826
[13-Sep-2014 07:47:57 UTC] PHP Warning: SoapServer::SoapServer():
Failed to enable crypto in
/home/plaza/public_html/lib/Zend/Soap/Server.php on line 826
[13-Sep-2014 07:47:57 UTC] PHP Warning:
SoapServer::SoapServer(https://www.plazapinger.com/index.php/api/soap/index/?wsdl=1):
failed to open stream: operation failed in
/home/plaza/public_html/lib/Zend/Soap/Server.php on line 826
[13-Sep-2014 07:47:57 UTC] PHP Warning: SoapServer::SoapServer(): I/O
warning : failed to load external entity
"https://www.plazapinger.com/index.php/api/soap/index/?wsdl=1"
in /home/plaza/public_html/lib/Zend/Soap/Server.php on line 826
[13-Sep-2014 07:47:57 UTC] PHP Notice: SoapServer::SoapServer(): failed
to discard buffer. No buffer to discard in
/home/plaza/public_html/lib/Zend/Soap/Server.php on line 826
[13-Sep-2014 07:47:57 UTC] PHP Fatal error: SOAP-ERROR: Parsing WSDL:
Couldn't load from
'https://www.plazapinger.com/index.php/api/soap/index/?wsdl=1'
: failed
to load external entity
"https://www.plazapinger.com/index.php/api/soap/index/?wsdl=1"
in /home/plaza/public_html/lib/Zend/Soap/Server.php on line 826
--
Edit bug report at https://bugs.php.net/bug.php?id=68017&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68017&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68017&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68017&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68017&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68017&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68017&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68017&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68017&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68017&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68017&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68017&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68017&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68017&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68017&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68017&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68017&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68017&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68017&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68017&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68017&r=mysqlcfg
Thread (4 messages)
- dallas at ekkysoftware dot com