bluemicrobyte
08-09-2006, 12:48 AM
I'm working on copying part of my website to a new host. Now I'm having a problem with one of the scripts (that I wrote) that uses fopen, here's the error I get:
Warning: fopen(logs/FILENAME.txt): failed to open stream: Permission denied in /home/USER/public_html/FILEPATH/FILE.php on line 9
line 9 is this: $fp = fopen($logfile, "a");
It worked on my old host, and I have no idea what's causing this problem. Any ideas?
(and I've tried CHMODing the script to 777, as well as the directory and file it's trying to open)
edit: My hosts tech support was able to solve the problem - the files need to be chmoded to 666 IF they file was uploaded to the server by the user -- if the PHP script creates the file, it doesnt need to be modified. Quite interesting indeed.
Warning: fopen(logs/FILENAME.txt): failed to open stream: Permission denied in /home/USER/public_html/FILEPATH/FILE.php on line 9
line 9 is this: $fp = fopen($logfile, "a");
It worked on my old host, and I have no idea what's causing this problem. Any ideas?
(and I've tried CHMODing the script to 777, as well as the directory and file it's trying to open)
edit: My hosts tech support was able to solve the problem - the files need to be chmoded to 666 IF they file was uploaded to the server by the user -- if the PHP script creates the file, it doesnt need to be modified. Quite interesting indeed.