tibberous Posted July 25, 2007 Share Posted July 25, 2007 I have a script that is using fopen to see if a file exists or not. It works unless the file it is opening is on the same domain as it, then it gives these errors: Warning: fopen() [function.fopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/narutof2/public_html/download.php on line 77 Warning: fopen(http://pubserver.narutofob.com/010.zip) [function.fopen]: failed to open stream: Permission denied in /home/narutof2/public_html/download.php on line 77 It looks like maybe fopen doesn't have the permissions to access the file, but I'm not sure what to do about it. Does anyone have any ideas what would cause this? Link to comment https://forums.phpfreaks.com/topic/61676-fopen-gives-error-when-reading-files-from-the-same-domain/ Share on other sites More sharing options...
deadimp Posted July 25, 2007 Share Posted July 25, 2007 Have you tried opening another file, maybe the same directory as the script, and seeing what happens? Also, what is your code? Are you using the absolute URL for the file (which could be the problem if fopen() isn't enabled to access files externally) or relative? Link to comment https://forums.phpfreaks.com/topic/61676-fopen-gives-error-when-reading-files-from-the-same-domain/#findComment-307339 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.