I\'m using XAMPP on Windows and try to work with PHP soap extension SoapClient. I\'m trying to load a WSDL file hosted in HTTPS site using the following code
To workaround this error you could deactivate the SSL certificate validation. But keep in mind, that this should only be done for test cases, because this makes your connection insecure!
You can pass a stream context when instantiating the SoapClient
like this:
stream_context_create([
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
],
]),
]);
If you have a valid certificate but it is selfsigned, there is another solution (more secure):
stream_context_create([
'ssl' => [
'allow_self_signed' => true,
],
]),
]);