"could not acquire lock" problems

barnsta

Joined: 2004-01-12
Posts: 41
Posted: Fri, 2004-07-23 08:55

Hi there

I have been having a nightmare with gallery, i started getting tehse errors about not being able to acquire a lock?! I chmoded everything to 777, that didn't work so i deleted and re-installed gallery. I am still getting these erros just after config. wizard:

The user database in your gallery was created with an older version of the software and is out of date. This is not a problem! We will upgrade it. This may take some time. Your data will not be harmed in any way by this process. Rest assured, that if this process takes a long time now, it's going to make your gallery run more efficiently in the future.
If you get an error, and only some users are upgraded, try refreshing the page to upgrade remaining users.

Please Wait...

Checking user 1 of 3 . . . . skipped
Checking user 2 of 3 . . . . skipped

Checking user 3 of 3 . . . . skippedError: Could not acquire lock (/home/sites/mysite/public_html/gallery/albums/.users/userdb.dat.lock)! Error: Could not acquire lock (/home/sites/mysite.co.uk/public_html/gallery/albums/.users/userdb.dat.lock)!

Error: There was a problem upgrading users. Please check messages above, and try again

please help i am going nuts here and i just wanna use gallery!

----
Give us your Gallery/webserver information to get a faster answer.

Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful):
Gallery version:
Apache version:
PHP version (don't just say PHP 4, please):
Graphics Toolkit:
Operating system:
Web browser/version (if applicable):

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Fri, 2004-07-23 09:22
 
barnsta

Joined: 2004-01-12
Posts: 41
Posted: Fri, 2004-07-23 09:31

thanks but this is happening on a fresh install!

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Fri, 2004-07-23 09:36

Probably because you didn't set permissions on the albums/ dir before running the config wizard.

 
barnsta

Joined: 2004-01-12
Posts: 41
Posted: Fri, 2004-07-23 09:43

i am sure i did!!, I will try again and let you know, thanks for your help so far.

cheers

 
barnsta

Joined: 2004-01-12
Posts: 41
Posted: Fri, 2004-07-23 10:07

tried again, still same errors!!! :(

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Fri, 2004-07-23 10:20

Did you also chmod the .users dir? (usually it's hidden).

 
barnsta

Joined: 2004-01-12
Posts: 41
Posted: Fri, 2004-07-23 11:00

Hi Hobbel,

i appreciate your help, yes i chmodded the .users too.

shall I pm you details of server and maybe my ftp details so you can look,

the site is [url]www.maddisanger.co.uk/gallery

thanks
[/url]

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Fri, 2004-07-23 11:08

Normally thats a paid support query, but sure, PM me and I can have a quick look.

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Fri, 2004-07-23 18:08

Problem is that permissions seems to get reset at some (random) intervals, and there is nothing we can do about it. This has to go into the ISP Weirdness category, and no one but them can do anything about it, i'm afraid.

 
barnsta

Joined: 2004-01-12
Posts: 41
Posted: Tue, 2004-07-27 10:54

Hi Hobbel

thanks for trying, I really don't know what to do?! as i want to use gallery, my isp will not support 3rd party scripts! I tried to run the configuration again and bnoticed that i get this warning at the beginning,
"Apache is not obeying your .htaccess file. Try entering the following into your web server's httpd.conf file:"

I was wondering if this had anything to do with it.

If not then it is somethibg to do with the.users file within albums folder.

cheers

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Tue, 2004-07-27 11:15

barnsta, there is not much we can do about your hosts setup i'm afraid. The problem you are having is not related to the .htaccess file, and your Gallery should work fine without that change (the only difference is that Gallery won't create small, nicely formatted URLs for you).

I would consider changing hosts, if you have the possibility to do so.

 
barnsta

Joined: 2004-01-12
Posts: 41
Posted: Tue, 2004-07-27 12:31

Hi there,

Thanks for still reading my posts but i am not going to give up yet, I found this post, he says "here is a parallel solution! I think.

go to the parent dir of your albums dir.
copy it to a new albums dir on a different level
cp -rf albums "../new albums dir"
this will make you the owner !!!
go to your gallery dir.
sh configure.sh
go to gallery/setup
reconfigure gallery and point to the "new albums" dir.

this appears to cure the bizzare login-at-times-and-not-at-others upgrade as well. "

Do you think it will work? I understand about the changing the albums to a new level but what does he mean cp -rf? and sh configure.sh?
I am slightly confused how to do this, Also I haven't gone in through hell access to change chmod, maybe that will help.

Thanks so far Hobbel http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=18346&highlight=lock

 
grantiago

Joined: 2002-08-23
Posts: 78
Posted: Tue, 2004-07-27 13:36

barnsta: first, almost all my gallery problems are mine or from my ISP. the ISP permissions are almost always what seem to have me stumbling.

try the above solution. it doesn't really affect anything. you are just making a copy and telling gallery to look at the copy instead of the orignal. by making a copy you are changing the owner to you. when gallery generates all those mystery files in the album directories, the script or server is creating them. therefor the server is the owner and, for what I assume is securty, it doesn't want to give the permissions to you.

you can always go back and reconfigure gallery to point to your old directories and old problems.

I just upgraded a ton of sites and all are working save one (missing the users).

those are unix commands. I thought I was the only one shooting in the dark here:
cp is copy
-rf is a suffix for recursive and force
sh configure.sh is to put your gallery in configure mode.
you need shell access (ask your ISP) and a telnet client (free everywhere) to use this.

you can also use ftp to do all this, but it is much slower and doesn't always change the permissions as you think.

for more unix answers just do a search on the web: "how to sh a script."

good luck

 
barnsta

Joined: 2004-01-12
Posts: 41
Posted: Tue, 2004-07-27 13:58

ok tried all of that thanks grantiago, but still getting thoise annoying error messages. I used putty for shell access and it seemed to work fine, i just know that I am doing something wrong, probably something to do with the cp -rf command and where the config. wizard is pointing towards the directory. I am installing a fresh copy as I wanted to change over from coppermine to gallery as it looks much better.I am sure can get it to work but my patience is running out.

any other suggestions very welcome

thanks for your time

 
grantiago

Joined: 2002-08-23
Posts: 78
Posted: Tue, 2004-07-27 14:42

How many albums do you have? cuz you could go in with telnet and in one line copy (cp *.jpg) all the *.jpg files to a new directory. then in two easy strokes remove (rm) all the *thumb.jpg, *sized.jpg files. then zip them again: zip newzipfile.zip filestozip (*.jpg)

aim the gallery config at a new, third (?) empty albums dir. then rebuild the albums using the url form.

how's that sound?

grant

 
barnsta

Joined: 2004-01-12
Posts: 41
Posted: Tue, 2004-07-27 15:15

I don't have any albums as yet because it is a clean install!

 
barnsta

Joined: 2004-01-12
Posts: 41
Posted: Tue, 2004-07-27 15:46

Problem solved so far!!!

I read an older post from 2002!! that's how desprtate i was to get it sorted, all I did was turn flocks off in the config. wizard!

if any probs. i will reply back. :P

 
grantiago

Joined: 2002-08-23
Posts: 78
Posted: Wed, 2004-07-28 04:22

how much time have I wasted and the solution was right there. like I said, I've been shooting in the dark. never knew what flock was. What is it?