Edit report at http://bugs.php.net/bug.php?id=31050&edit=1
ID: 31050 Comment by: zhb1208 at hotmail dot com Reported by: dylanwoster at mac dot com Summary: SOAP class will not parse WSDL file located on a secure HTTPS connection Status: No Feedback Type: Bug Package: SOAP related Operating System: Mac OS X 10.3.6 PHP Version: 5.0.2 Assigned To: dmitry Block user comment: N New Comment: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://192.168.0.14:8080/rpc/soap/jirasoapservice-v2?wsdl' : failed to load external entity "http://192.168.0.14:8080/rpc/soap/jirasoapservice-v2?wsdl" Previous Comments: ------------------------------------------------------------------------ [2009-03-05 12:13:40] ykohut at parallels dot com I have the same bug on: # cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.2 (Tikanga) # uname -p i686 # /hsphere/shared/php5/bin/php-cli --version PHP 5.2.9 (cli) (built: Mar 5 2009 01:52:37) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies with the ionCube PHP Loader v3.1.32, Copyright (c) 2002-2007, by ionCube Ltd., and with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies The SOAP is loaded as external extension via corresponded .ini file: #cat php.d/soap.ini ; Enable soap extension module extension=soap.so The extension is successfully loaded, which is reported php_info(): soap Soap Client enabled Soap Server enabled Directive Local Value Master Value soap.wsdl_cache 1 1 soap.wsdl_cache_dir /tmp /tmp soap.wsdl_cache_enabled 1 1 soap.wsdl_cache_limit 5 5 soap.wsdl_cache_ttl 86400 86400 and with # php-cli -i: # /hsphere/shared/php5/bin/php-cli -i|grep soap Configure Command => './configure' '--localstatedir=/var/hsphere/php' '--with-bz2=/hsphere/shared' '--enable-ctype' '--enable-dba' '--enable-ftp' '--with-gettext=/hsphere/shared' '--enable-mbstring=all' '--with-gd' '--with-mhash=/hsphere/shared' '--with-mcrypt=/hsphere/shared' '--with-openssl=/usr' '--enable-overload' '--enable-posix' '--enable-session' '--enable-sockets' '--enable-standard' '--enable-tokenizer' '--with-xml=/hsphere/shared' '--with-xsl=/hsphere/shared' '--with-zip=/hsphere/shared' '--with-zlib=/hsphere/shared' '--with-zlib-dir=/hsphere/shared' '--with-freetype-dir=/hsphere/shared' '--with-png-dir=/hsphere/shared' '--with-jpeg-dir=/hsphere/shared' '--with-expat-dir=/hsphere/shared' '--with-iconv-dir=/hsphere/shared' '--with-libxml-dir=/hsphere/shared' '--enable-gd-native-ttf' '--with-ttf' '--enable-mbstr-enc-trans' '--with-expat-dir=/hsphere/shared' '--with-xslt-sablot=/hsphere/shared' '--with-gnu-ld' '--with-curl=shared,/hsphere/shared' '--with-curlwrappers' '--with-dom=shared,/hsphere/shared' '--with-dom-xslt=/hsphere/shared' '--with-dom-exslt=/hsphere/shared' '--with-dom=shared,/hsphere/shared' '--with-fileinfo=shared,/hsphere/shared' '--with-gmp=shared,/hsphere/shared' '--with-iconv=shared,/hsphere/shared' '--with-imap=shared,/hsphere/shared' '--with-imap-ssl=shared,/usr' '--with-mcal=shared,/hsphere/shared' '--with-mysql=shared,/usr' '--with-mysqli=shared' '--with-pgsql=shared,/usr' '--with-sqlite=shared' '--enable-sqlite-utf8' '--with-unixODBC=shared,/hsphere/shared' '--with-xmlrpc=shared' '--enable-htscanner' '--enable-track-vars' '--enable-trans-sid' '--enable-memory-limit' '--enable-force-cgi-redirect' '--enable-fastcgi' '--with-config-file-path=/hsphere/local/config/httpd/php5' '--with-config-file-scan-dir=/hsphere/local/config/httpd/php5/php.d' '--enable-magic-quotes' '--with-pear=/hsphere/shared/apache/libexec/php5ext/php' '--with-mime-magic=/hsphere/local/config/httpd/magic' '--with-inifile' '--with-flatfile' '--enable-pdo=shared' '--with-pdo-sqlite=shared' '--with-pdo-mysql=shared' '--with-pdo-pgsql=shared' '--enable-soap=shared' '--prefix=/hsphere/shared/php5' '--with-apxs=/hsphere/shared/apache/bin/apxs' '--enable-cli' /hsphere/local/config/httpd/php5/php.d/soap.ini, soap soap.wsdl_cache => 1 => 1 soap.wsdl_cache_dir => /tmp => /tmp soap.wsdl_cache_enabled => 1 => 1 soap.wsdl_cache_limit => 5 => 5 soap.wsdl_cache_ttl => 86400 => 86400 The is no matter in which mode PHP is running. The problem take place as well on Apache handler (libphp mode) and CGI/FastCGI modes. The error looks like in: - Apache error_log : [Wed Mar 11 08:23:34 2009] [error] [client 192.168.128.234] failed to load external entity "https://soap.amazon.com/schemas3/AmazonWebServices.wsdl" - php_error.log : [11-Mar-2009 08:23:34] PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://soap.amazon.com/schemas3/AmazonWebServices.wsdl' : failed to load external entity "https://soap.amazon.com/schemas3/AmazonWebServices.wsdl" in /hsphere/local/home/web-2/web2.r527/soap.php on line 2 The test script used: # cat soap.php <?php $client = new SoapClient("https://soap.amazon.com/schemas3/AmazonWebServices.wsdl", array('exceptions' => 0)); $result = $client->__getFunctions(); if (is_soap_fault($result)) { trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faultstring})", E_USER_ERROR); } else { var_dump($result); } ?> We investigated the problem very close and discovered that the reason is with libxml libraries statically compiled into PHP. Details: PHP is compiled with the following XML related options: --with-xml=/hsphere/shared --with-libxml-dir=/hsphere/shared --with-xmlrpc=shared If libxml2 static library is available in the {prefix} directory (libxml2.a), PHP includes libxml2 library into itself at buildtime. In that case, soap FAILS to work with https. If libxml2 shared library is available in the {prefix} directory (libxml2.so), PHP doesn't includes libxml2 library into itself at buildtime, but seach the library at runtime. In that case, soap works with https fine. Please let me know if more details required. Also please advise the issue solution. ------------------------------------------------------------------------ [2008-07-07 17:29:21] john at soundreal dot co dot uk I've cracked this, problem was with my php configuration. Needed to recompile using -with-openssl now working fine on Mac os 10.4.11 with php 5.2.6 ------------------------------------------------------------------------ [2008-06-19 14:22:57] trippinbilly25 at gmail dot com I have solved this problem on Windows XP by replacing the following .dll files in the System32 folder with their versions located in the php folder: libeay.dll ssleay32.dll For some reason an error was logged in my Apache error log that said OpenSSL was not being loaded, replacing these files solved the problem for me. ------------------------------------------------------------------------ [2008-04-22 15:20:14] pejusdas at gmail dot com I'm having the same problem with a linux box running php 5.2.5 and a win xp box running the same version. Has anybody found the solution for this problem yet? Thanks. Pejus ------------------------------------------------------------------------ [2008-04-02 01:03:16] jfarhat at kirkhamsystems dot com I am also having the same problem in PHP 5.2.5. the procedure code at the end of the message works for HTTP but fails with HTTPS with the message: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://arcweb.esri.com/services/v2/Authentication.wsdl' .... Reproduce code: --------------- $client = new SoapClient( "https://arcweb.esri.com/services/v2/Authentication.wsdl" ); echo( $client->getVersion( ) ); ------------------------------------------------------------------------ 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 http://bugs.php.net/bug.php?id=31050 -- Edit this bug report at http://bugs.php.net/bug.php?id=31050&edit=1