#49230 [Opn->Bgs]: error using SoapClient with certificates in PHP

From: Date: Wed, 12 Aug 2009 09:50:22 +0000
Subject: #49230 [Opn->Bgs]: error using SoapClient with certificates in PHP
References: 1  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-5654@lists.php.net to get a copy of this message
ID: 49230 Updated by: bjori@php.net Reported By: nirjal_nirvana at hotmail dot com -Status: Open +Status: Bogus Bug Type: Website problem Operating System: Windows XP PHP Version: Irrelevant New Comment: This is not a problem with the www.php.net website. Furthermore, we only support binaries from php.net, not xampp. ...And this is not a support forum. If you really believe this is a problem in the PHP language itself then create short, but *complete* (i.e. 192.158.51.212 doesn't work for me, neither does test.asmx) reproduce example and refile the bug report in the proper category. -Hannes Previous Comments: ------------------------------------------------------------------------ [2009-08-12 05:58:16] nirjal_nirvana at hotmail dot com Description: ------------ Hi, I have been trying to access webservice in asp.net using php client. The webservice requires the use of a certificate, I've downloaded the certificate from a CA server thats from a windows server 2008 and the client certificate has a .cer extension. When I use the certificate from an asp.net client the webservice is consumed, but when I try it from php I get a warning and an error Reproduce code: --------------- $soap = new SoapClient('https://192.168.51.212/test.asmx?wsdl', array ( 'local_cert' => './path/nkCert.cer' )); } catch (Exception $e) { echo "Caught exception: ". $e->getMessage() . "\n"; } Actual result: -------------- Warning: SoapClient::SoapClient() [soapclient.soapclient]: Unable to set private key file `C:\xampp\htdocs\path\nkCert.cer' in C:\xampp \htdocs\CertApp2.php on line 40 Warning: SoapClient::SoapClient() [soapclient.soapclient]: failed to create an SSL handle in C:\xampp\htdocs\CertApp2.php on line 40 Warning: SoapClient::SoapClient() [soapclient.soapclient]: Failed to enable crypto in C:\xampp\htdocs\CertApp2.php on line 40 Warning: SoapClient::SoapClient(https://192.168.51.212/test.asmx?wsdl) [soapclient.soapclient]: failed to open stream: operation failed in C: \xampp\htdocs\CertApp2.php on line 40 Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : failed to load external entity "https://192.168.51.199/ MGACalls.asmx?wsdl" in C:\xampp\htdocs\CertApp2.php on line 40 Caught exception: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://192.168.51.212/test.asmx?wsdl' : failed to load external entity "https://192.168.51.212/test.asmx?wsdl" Fatal error: Call to a member function __getFunctions() on a non- object in C:\xampp\htdocs\CertApp2.php on line 51 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49230&edit=1

« previous php.webmaster (#5654) next »