PAAAT Posted October 1, 2006 Posted October 1, 2006 Hey, I need some help, I'm rewriting a script that parses an rss, to make my site load faster i'm adding code to cache what i need into a file. So that i only read it every hour rather than every page load. Here's what it says: Warning: fopen(./cache/steam_news.cache) [function.fopen]: failed to open stream: Permission denied in file on line x line x looks like that: if ( $the_file = fopen($cache_file, "w") ) { so it can't open the file to read it. I would apreciate if someone told me if i have to change the chmod and to what. My concern is that i only want to give it the minimum permision to do that so that no one can modify that file other than the server. please let me know what i can do. thanks in advance Quote
PAAAT Posted October 2, 2006 Author Posted October 2, 2006 it works if i set the chmod to 777 on the folder i wanna put the cache file into, but is that safe to do so? Quote
TCH-Don Posted October 2, 2006 Posted October 2, 2006 Most scripts like forums and image galleries and so forth use 777 for a folder so the script can write to the folder. Is it safe, maybe not , but what choice do we have. Quote
PAAAT Posted October 7, 2006 Author Posted October 7, 2006 okay thanks, i was just wondering if there was a safer way to do it. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.