Rectangle 27 1

You probably should clear symfony's cache, even manually, because it keeps sometimes references to resources you might have set in your config files in the past. I had the same kind of error for a translation yaml file which had been deleted, and that solved my problem.

php app/console cache:clear --no-debug

rm -Rf app/cache/*
rm -RF app/logs/*

You'll may have to set up permissions on these folders. There's a note explaining how to do that in Installing and Configuring Symfony.

Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).

php - Troubleshooting "failed to load external entity" when loading Sy...

php symfony
Rectangle 27 0

You want to change the variable in the function from $url to $searchCode as the $url variable is empty and wasn't set anywhere.

if (!empty($_POST['searchbird'])){
    $searchbird=rawurlencode($_POST['searchbird']);
    $searchCode = "http://ebird.org/ws1.1/data/obs/region_spp/recent?rtype=subnational2&r=US-AZ-013&sci=$searchbird";
    $url_headers = @get_headers($searchCode);

    if($url_headers[0] == 'HTTP/1.1 200 OK') {
        $xml = simplexml_load_file($searchCode);

        print_r($xml);
 ....

php - failed to load external entity "" - Stack Overflow

php api simplexml
Rectangle 27 0

Warning: DOMDocument::load(): php_network_getaddresses: getaddrinfo failed: No such host is known. in D:\xampp\htdocs\sweet\restRendering.php on line 25

your server has a problem with DNS. It can't connect to www.myweather2.com because it can't translate it to an IP address.

nslookup www.myweather2.com

and see what the results are. When you solve that problem, your script will probably work.

PHP:DOMDocument::load(): I/O warning : failed to load external entity ...

php
Rectangle 27 0

On register_client.php make sure that the URL that has been passed to SoapClient is accessible from the machine you're executing the code.

$sClient = new SoapClient('http://127.0.0.1/MyRegistration/login.wsdl');

If 127.0.0.0 does not work you can try using some network IP address and see.

Let me know if it still does not fix it for you, I did try with your example and changing path (making it proper in my dev. environment) has fixed same error for me.

xml - SOAP PHP fault parsing WSDL: failed to load external entity? - S...

php xml soap wsdl wamp
Rectangle 27 0

I had the same problem upgrading to Magento 1.9.0.1. I solved the problem with this official patch

Hey Thanks but mine is Magento ver 1.5x. Has this version also got any patch to solve this issue?

magento - SOAP-ERROR: Parsing WSDL: Couldn't load from : failed to loa...

magento soap wsdl
Rectangle 27 0

Use function GET of package httr to retrieve html content:

info<-readHTMLTable(rawToChar(GET("http://www.eurexchange.com/action/exchange-en/155392-31606/31608/quotesSingleViewOption.do?callPut=Call&maturityDate=201312")$content),which=1)

R readHTMLTable: Error failed to load external entity - Stack Overflow

r
Rectangle 27 0

$_URI
$_URI = "http://testws.localhost/album";

(i.e. with the http schema).

second you are passing the wrong argument to AutoDiscover, the first argument of the AutoDiscover is not the url, try replacing your handleWSDL method with this:

private function handleWSDL() {
    $autodiscover = new AutoDiscover();
    $autodiscover->setClass('Soaptest')
                 ->setUri($this->_URI);
    $autodiscover->handle();
}

Sorry you are correct that they were wrong but that wasn't the actual cause, that just got messed up when I was cleaning up my code to post it. I have edited the question to fix that, however I think I may have figured out the actual issue, will post an answer when I know for sure

php - Zend SOAP Server SOAP-ERROR:Parsing WSDL: Couldn't load from 'X'...

php zend-framework2 zend-soap
Rectangle 27 0

It appears that there is not actually a real problem at all. Both a c# sample app I was creating and XMLSpy are able to read in the wsdl file and make requests to the service.

I am guessing that the error generated was due to the fact that my web browser was not sending a soap request, and that in order to process the wsdl file the soap server tries to match information from the request against the service description. I would have expected an error to come back about the lack of a valid soap request, rather than an error about a perfectly valid and available wsdl file. Not sure if this error is created by the zend soap server or the underlying php soap server that it uses.

So if anyone else sees this error, make sure you are testing with a proper soap client.

php - Zend SOAP Server SOAP-ERROR:Parsing WSDL: Couldn't load from 'X'...

php zend-framework2 zend-soap
Rectangle 27 0

To be able to read from secure protocol (https), you need to have openssl extension turned on from php.ini in the extensions section.

@hd: You are welcome :)

php - failed to load external entity error on SOAP - Stack Overflow

php soap
Rectangle 27 0

I've copied your code and it works. But i see that your index.php is inside "views" folder and you have some htaccess file, so probably some rewrites are defined and it messes something with working dir. Try to use absolute path. If it does not help and you are on linux then check note.xhtml permissions.

<?php
$xml=simplexml_load_file(__DIR__."/note.xhtml") or die("Error: Cannot create object");
print_r($xml);
?>

codeigniter - php failed to load external entity - Stack Overflow

php codeigniter xhtml
Rectangle 27 0

This problem is caused by the server not being able to access the file from the local machine. So the possible cause could've been the DNS server or /etc/hosts, but it was actually a .htaccess file blocking any hosts except from our development computers. This resulted in a 403 Forbidden error, which resulted in the SOAP error and so on..

I had the same error and it was DNS related. My server was not live so I had my local host file modified to see the Magento site. Then when I called the login method via API, the API was doing its own DNS calls and being redirected to the public DNS IP which wasnt a Magento site, which then caused the error. Hope this helps! (This is in reference specifically to 1.7.0.2)

I had the same problem in Magento 1.9.0.1: The Magento SOAP API seems to do some internal HTTP-requests. Our (staging-) website was behind some .htaccess-rules that whitelisted only some specific IP addresses. Adding the servers' IP address to this list solved the problem for me.

Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).

php - Unable to connect to Magento SOAP API v2 due to "failed to load ...

php soap magento wsdl
Rectangle 27 0

After 6 hours of headache, the ONLY solution is to download the WSDL files.

It will always throw an error 500, because this is not the wsdl.

Once you download the wsdls from Technical Resources -> FedEx WebServices For Shipping -> GetStarted (click on "Rate Services" and then "Download WSDL or XML"), in your script you will need to load your locally stored WSDL and everything will work like a charm.

$this->_soapClient = new SoapClient("RateService_v13.wsdl", array('exceptions'=>true, 'trace' => true));

Thanks Justin. This is what I eventually found out to be true myself, and as I read back over this original post, I never closed it out with the correct answer noted. Yours is indeed the correct solution, which I find after hours of beating my head against the wall as well. The FedEx documentation is horribly lacking in this regard.

php - SoapClient LibXMLError: failed to load external entity, SOAP-ERR...

php xml web-services soap wsdl
Rectangle 27 0

I solved this specific issue by placing all taxonomy files from 2008 in my XBRLCache folder.

I downloaded the correct files (not empty as what the error was) at this link:

There can be a problem with loading the page as I saw it did not always work. Probably those servers are too busy..

I hope this works for other people as well!

Too bad I did not solve the not catching problem..

r - Try Catch not catching "error : unknown IO error" - I/O warning : ...

r try-catch ioerror xbrl
Rectangle 27 0

I had the exactly same problem today. In my case, the reason lied some steps higher. It's a magento installation and it didn't work, because i didn't whitelist api calls (even though I whitelisted my IP, what strangely wasn't enough). For me, the fix:

if (file_exists($maintenanceFile) && !in_array($ip, $allowed) && !strstr($_SERVER['REQUEST_URI'], 'v2_soap')) {
    include_once dirname(__FILE__) . '/errors/503.php';
    exit;
}

Should you NOT use magento, this could be nonetheless interesting for you, as it shows, that the reason can lay on a index or a htaccess file, layers above the wdsl itself. With the browser i could access the address, just like you. So maybe there's a controll switch in your system, that kills the request.

php - Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Pa...

php web-services soap wsdl
Rectangle 27 0

Package XML has some issues. The problem is intermitent and has nothing to do with the URL. I solved the problem using the function GET of httr package in order to obtain the html code, then passed it to htmlParse, see below:

library("XML")
library(httr)
url <- "http://www.england.nhs.uk/statistics/statistical-work-areas/bed-availability-and-occupancy/"
doc <- htmlParse(rawToChar(GET(url)$content))

xml - htmlParse fails to load external entity - Stack Overflow

xml r
Rectangle 27 0

add this command to the top of your script: libxml_disable_entity_loader(false);

xml - PHP Warning: DOMDocument::load(): I/O warning : failed to load e...

php xml domdocument
Rectangle 27 0

1)Is you a application directory password protected?

3)Check php soap and xml rpc extensions are enabled or not.

Sure i'll check everything and drop you an update shortly. Thanks for the response and hope it mostly solves our issue.

I tried the step 2 but i got the same error. My application directory is not password protected. Is there any problem associated with this one. And how to check if my xml rpc extensions are enabled or not. I could not find a way to check this. Can you pl help me out with it. Thanks :)

run a file in root with echo phpinfo(). You should be able to see soap and xmlrpc enabled there

Hi Muk, xml rpc extensions are enabled for our site.

magento - SOAP-ERROR: Parsing WSDL: Couldn't load from : failed to loa...

magento soap wsdl
Rectangle 27 0

I've experience a similar problem recently on a public-facing development server. The problem was the I was using a .htaccess file to prevent unauthorized use of the site and I forgot to add the server's own IP addresses to the list. Once I added it, it solved the problem.

Make sure that you don't have any rules forbidding access to your content.

I too was facing this problem in my loacalhost wamp server ,I had password protected my www directory using .htaccess file. Once password protection removed everythisng worked well.

php - Unable to connect to Magento SOAP API v2 due to "failed to load ...

php soap magento wsdl
Rectangle 27 0

Make sure that php.ini enables SSL. add this to your file: extension=php_openssl.dll

I had this problem and that was what fixed it.

php - Unable to connect to Magento SOAP API v2 due to "failed to load ...

php soap magento wsdl