Home >Backend Development >PHP Tutorial >Solve PHP SOAP intermittent errors Solution: Soap WSDL Error - 'failed to load external entity'

Solve PHP SOAP intermittent errors Solution: Soap WSDL Error - 'failed to load external entity'

WBOY
WBOYOriginal
2016-07-29 09:07:101510browse

I haven’t written a blog for a long time. I usually record the content into Evernote. But I have been troubled by this problem for a long time. I have searched through Du Niang and Google, and most of the answers cannot solve my problem.

The details of the problem are as follows, php SOAP interface, intermittentSoap WSDL Error - "failed to load external entity" error appears. The key to the problem is "intermittent". If errors are reported all the time, it will be easier to check the errors.

The solutions on the Internet are to either enable openssl or change to no wsdl mode. None of the above methods can solve my problem.

Finally, I found a method on zend’s official forum, and the source pointed to the PHP manual. Again, read the manual when encountering problems. ORZ Manual!

If libxml_disable_entity_loader() has been called already, add before each SoapClient instantiation:
libxml_disable_entity_loader(false);

Above any calls to instantiate SoapClient.

front (top of page), Add this sentence libxml_disable_entity_loader(false);

Original link http://forums.zend.com/viewtopic.php?f=8&t=116708#p225468

The above introduces how to solve PHP SOAP intermittent errors. Solution: Soap WSDL Error - "failed to load external entity", including the content, I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn