Click to See Complete Forum and Search --> : failed to open stream: Permission denied


DARTHTAMPON
09-20-2008, 07:39 PM
Warning: simplexml_load_file(http://anothersite.com/shopping?callname=FindItemsAdvanced&responseencoding=XML) [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

NogDog
09-21-2008, 01:27 AM
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:\wamp\www\test\test.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:\wamp\www\test\test.php on line 2
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.