PHP https访问webservice

来源:岁月联盟 编辑:exp 时间:2012-09-15

测试环境中PHP以http访问webservice,一切正常。

但生产环境的webservice是https,程序显示SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://***/Service?wsdl' : failed to load external entity "https://***/Service?wsdl", 但直接在网页中打开https://***/Service?wsdl,返回正常。

配置环境:

  php server:WAMP

  webservice:LAMP


查了一天的资料,原来要这样:

在windows下就是需要php_curl.dll和php_openssl.dll, curl同时依赖于libeay32.dll, ssleay32.dll, openssl依赖于libeay32.dll

也就是PHP server要加载上述这些模块。