|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-08-12 09:50 UTC] bjori@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 23 14:00:01 2025 UTC |
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