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. mysql - SQL操作时间的函数?2. golang - 用IDE看docker源码时的小问题3. 正则表达式 - python pandas的sep参数问题4. docker网络端口映射,没有方便点的操作方法么?5. MYSQL新建用户设置可以远程访问的问题6. 关docker hub上有些镜像的tag被标记““This image has vulnerabilities””7. python - 求一个在def中可以实现调用本def满足特定条件continue效果的方法(标题说不太清楚,请见题内描述)8. javascript - ionic run android报错9. docker内创建jenkins访问另一个容器下的服务器问题10. javascript - 用表单提交两个时间段请求后台返回对应数据时出现的一些问题!
