Php 生产服务器上的SOAP请求失败

Php 生产服务器上的SOAP请求失败,php,soap,Php,Soap,我正在使用SOAP Web服务进行增值税有效性检查。 它可以在我的工作站和测试服务器上正常工作,但不能在生产服务器上正常工作。在这里,它抛出了一个异常: $ php -a Interactive shell php > $client = new \SoapClient('http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl', array('exceptions' => true)); PHP Fatal e

我正在使用SOAP Web服务进行增值税有效性检查。 它可以在我的工作站和测试服务器上正常工作,但不能在生产服务器上正常工作。在这里,它抛出了一个异常:

$ php -a
Interactive shell

php > $client = new \SoapClient('http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl', array('exceptions' => true));
PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl' : failed to load external entity "http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl"
in php shell code on line 1
PHP Warning:  Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl' : failed to load external entity "http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl"
in php shell code:1
Stack trace:
#0 php shell code(1): SoapClient->SoapClient('http://ec.europ...', Array)
#1 {main}
  thrown in php shell code on line 1
这三台机器都运行相同的操作系统(Ubuntu 12.04)和PHP(5.3.10)版本。php soap(0.12.0-2)包安装在所有这些应用程序上。 我可以从生产服务器中获取wsdl文件。 这个问题已经持续了好几天,所以它不是暂时的

如果我下载wsdl并使用本地文件路径而不是远程http路径,它也可以在生产服务器上工作。然而,这不是一个好的解决方案


你知道我还能查什么吗?

那里的设置是什么?此外,根据soap服务器的恶劣程度,我在过去很幸运地定义了任何(无论您输入什么,只要某些服务器不是空的)Ooh,并检查您的是否可写../apache2/php.ini:allow_url_fopen=On wsdl_cache_dir is/tmp,它是可写的。将尝试user_agent,谢谢找到解决方案吗?我仍然停留在这里。对不起,我没有花更多的时间在这个问题上,因为它不是严格必要的功能。