【发布时间】:2013-10-10 19:18:36
【问题描述】:
我正在从一个虚拟服务器切换到另一个虚拟服务器并遇到问题。
新服务器正在运行 PHP 版本 5.3.3-7+squeeze1。旧是 PHP 版本 5.2.17。
简单的 SOAP 脚本
$client = new SoapClient($url);
报错
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'domain.com/wsdl' : failed to load external entity
即使尝试 file_get_contents 在新服务器上失败,但在旧服务器上工作。
echo file_get_contents("https://www.google.co.uk/");
我已尝试匹配 php.ini 文件。 allow_url_fopen = On 已启用,SOAP 和 cURL 也是如此。
任何建议都会很有帮助。
谢谢。
【问题讨论】:
-
我做的第一件事是 echo phpinfo() 。没有明显的差异。两者都启用了allow_url_fopen。