Haik Posted November 29, 2006 Posted November 29, 2006 Hiya. Couldn't find a relavent topic through searches, and I know this has to do with PHP but I didn't know where else to look, besides, it was caused after TCH fixed an error with their server about 2-3 weeks ago. The error I recieve is this: >Warning: fopen(/home/***/public_html/albums/Mclean-June-24,2006/photos.dat.lock) [function.fopen]: failed to open stream: Permission denied in /home/***/public_html/nuke/modules/gallery/platform/fs_unix.php on line 55 Error: Could not open lock file (/home/***/public_html/albums/Mclean-June-24,2006/photos.dat.lock)! I've checked all of my albums, it is the same error for all of them, just the album name changes in the code above to reflect which album I am in during the error. Now, I've looked at line 55 after TCH fixed the server/cpanel issue, and I looked at an older copy of the same file and they are identical. Thus, I'm lost. Here is lines 54 and 55 in fs_unix.php >function fs_fopen($filename, $mode, $use_include_path=0) { return fopen($filename, $mode, $use_include_path); I hope its an easy fix, I've already spent too many hours searching php boards and found nothing. My php skills are novice. My web url is www.waiparous.com url to the gallery http://waiparous.com/nuke/modules.php?name=gallery Quote
PeterPeter Posted November 29, 2006 Posted November 29, 2006 Haik have you been to the Gallery support forum http://gallery.menalto.com/forum to get help. I know it happened after something on the server fix. But you will probably get an answer quickly there. It could be something as easy as a permissions setting on the file concerned. The galleries seem to work and displays the error on the top of the window, correct ?? Also the error doesn't seem to appear on all galleries either. Quote
TCH-Thomas Posted November 29, 2006 Posted November 29, 2006 Welcome to the forum, Haik. I have edited out the cpanel username from the code part of your post. Please do no post user sensitive data in public forums. Quote
TCH-Bruce Posted November 29, 2006 Posted November 29, 2006 Welcome to the forums Haik Check the permissions of the gallery directories. I do not know what they should be set to since I do not use gallery but it looks like a permissions error to me. Quote
Haik Posted December 7, 2006 Author Posted December 7, 2006 Welcome to the forums Haik Check the permissions of the gallery directories. I do not know what they should be set to since I do not use gallery but it looks like a permissions error to me. Hi guys, thanks for the suggestions (and removing my username, I wasn't thinking). It did look like a permissions issue to me too, and here is what I've dug up for help. Fixing That “Could not open lock file” Gallery Error (Preface: Gallery is an open source tool for hosting photos on your website.) So, suppose you upgrade your copy of Gallery to the latest version (1.4.4-pl4 as of this writing), you follow the upgrade instructions, re-run the configuration wizard and then you get a goofy error such as this: Warning: fopen(/home/****/httpdocs/albums/2003/photos.dat.lock): failed to open stream: Permission denied in /home/****/httpdocs/gallery/platform/fs_unix.php on line 55 Error: Could not open lock file (/home/****/httpdocs/albums/2003/photos.dat.lock)! Yeah, that happened to me. Fortunately, there’s a known workaround. As it turns out, it’s not Gallery’s fault if this occurs — it generally only happens if your web host mucks up your permissions while upgrading your PHP setup. The solution? Just set the permissions on every file in your “albums” directory to 777. As noted in the workaround, this is fairly straightforward if you have shell access to your web host (just run “chmod -R 777 albums” from the parent directory). But, if you only have ftp access, then you’ll need to set each set “albums” to 777 manually; and, if your ftp client can’t recurse through directories, then you’ll need to manually hop through each directory within “albums” and manually set every file to 777. That should do it . I'm not too keen on doing this however. Wouldn't chmod'ing my album directories '777' create a security concern? Its all inside my public_html folder. I found this fix on this link. Should I try it? Quote
TCH-Bruce Posted December 7, 2006 Posted December 7, 2006 For the web server to write into those folders they either have to have 777 permissions or the user "nobody" needs to own them. Is it a security risk? Yes, but unfortunately no way around it that I know of. My guess is they were set to 777 before the server was restored and now they are not and you just don't remember. Quote
stubbie23 Posted December 11, 2006 Posted December 11, 2006 For the web server to write into those folders they either have to have 777 permissions or the user "nobody" needs to own them. Is it a security risk? Yes, but unfortunately no way around it that I know of. My guess is they were set to 777 before the server was restored and now they are not and you just don't remember. I am having the same problem as Haik. However, when I try to change the permissions for the "album" subfolders through the File Manager interface I get the error: [a fatal error or timeout occurred while processing this directive]. Any help would be appreciated. Quote
TCH-Andy Posted December 11, 2006 Posted December 11, 2006 Welcome to the forums stubbie23 Open a ticket at the help desk (link at the top of the page) and we'll take a look for you, Quote
stubbie23 Posted December 12, 2006 Posted December 12, 2006 Thanks everyone. I have submitted a ticket and hopefully everything will get sorted out. Quote
stubbie23 Posted December 12, 2006 Posted December 12, 2006 From ticket request to fix in less than 5 minutes. This is why I recommend Total Choice to everyone I know. Thanks for all the help. 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.