/    Sign up×
Community /Pin to ProfileBookmark

failed to open stream: Permission denied

Warning: simplexml_load_file([url]http://anothersite.com/shopping?callname=FindItemsAdvanced&responseencoding=XML[/url]) [function.simplexml-load-file]: failed to open stream: Permission denied in /home/1/html/1.php on line 127

logic would say that I need to adjust directory permissions. But this will be kind of hard since I am recieving the file from another site. readfile does the same for me. I am running php 5.2……

readfile gives me the same errors?

Any thoughts on what is going on?

tia

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@NogDogSep 21.2008 — If that's the actual URL you're using, it returns a 404 Not Found header, which in my installation causes simplexml_load_file to fail, but with the following errors instead of a "permission" error:


Warning: simplexml_load_file(http://anothersite.com/shopping?callname=FindItemsAdvanced&responseencoding=XML) [function.simplexml-load-file]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in C:wampwwwtesttest.php on line 2

Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "http://anothersite.com/shopping?callname=FindItemsAdvanced&responseencoding=XML" in C:wampwwwtesttest.php on line 2[/quote]

So I'm not entirely sure what to say, other than check if you're getting a 404 (just try opening the link directly in your browser), and also check to ensure that allow_url_fopen is enabled in your configuration.
×

Success!

Help @DARTHTAMPON spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...