php7使用SSL协议访问webservice出现问题
问题描述
错误为:SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://xxxxx/api?wsdl' : failed to load external entity "https://xxxxxxx/api?wsdl" in D:wwwcompare.php:22 Stack trace: #0 D:wwwcompare.php(22): SoapClient->SoapClient('https://xxx...', Array) #1 {main}
代码如下:
$opts =array('http' => array('user_agent' => 'PHPSoapClient'),'ssl'=>array('verify_peer'=>false ,'verify_host'=>false,"verify_peer_name"=>false));
$url="https://xxxxxxx/api?wsdl";
$params= array('encoding' => 'UTF-8','soap_version'=>SOAP_1_1,'trace' => 1, "exceptions" => 1, "connection_timeout" => 180,'username' => 'xx', 'password' => '*****','stream_context' => stream_context_create($opts));
$client =new SoapClient($url,$params);
另外php.ini配置没有问题,openssl和soap已经打开
请问下各位大佬,怎么解决????
问题解答
回答1:系统环境为windows2012+apche2.4+PHP7.2
相关文章:
1. react-native 启动Android项目失败2. python - 用ffmpeg采集视频,用terminate没法结束进程3. nginx - 关于vue项目部署到ngnix后出现的问题4. node.js - nodejs+express+vue5. node.js - vue-resource,如何改变响应格式?6. phpadmin的数据库,可以设置自动变化时间的变量吗?就是不需要接收时间数据,自动变化7. javascript - js数组键名为何不能用变量?我想像PHP那样使用变量作为关联数组键名该怎么做?8. javascript - 手机点击input时,button会被顶上去?求解决!!!9. css - 关于HTML中width和height的疑问(这个提问的标题不好起)10. javascript - tab切换点击不同的按钮显示不同的内容

网公网安备