Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted
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?

Posted

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.

Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...