Gossamer Forum
Home : Products : DBMan : Installation :

exclusive lock problem

Quote Reply
exclusive lock problem
Hello -
This is my first go at Perl and databases, so I'm really glad to get my demo script running at all.
My problem at the moment is that when I try to add a record I get this from the debugging output:

unable to get exclusive lock on ./default.db.

I've checked my permissions, ascii upload, Perl version (5.004) and locations.

What am I doing wrong? All help very much appreciated

Jez

Quote Reply
Re: exclusive lock problem In reply to
I don't whether if this is the problem but on what server are you running the database? If the server is running on WinNT, then that might be the problem. DBMan uses a command called flock. This is not available on WinNT. Either that or it may also be because you have define your .db file in correctly in your .cfg file.

This is just what I think may be the problem. I may be wrong.

Julian
Quote Reply
Re: exclusive lock problem In reply to
Thanks for replying!
I'm on Unix, and the database is the default one.
Does that help?

J

Quote Reply
Re: exclusive lock problem In reply to
Be sure you have in your .cfg file

$db_use_flock = 1;

which turns on flocking. If you are not able to use file locking on the server you are using there is an alternative recently posted in the DBMan discussion forum.

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: exclusive lock problem In reply to
Many thanks

I have had a go at turning flock off (ooer sounds rude) and that seems to do the trick. Am I going to mess things up further down the line?

Quote Reply
Re: exclusive lock problem In reply to
By turning flock off, you run into the risk of having the database being corrupted. Can't remember the reason but it has something to do with 2 persons changing the database at the same time.

Julian
Quote Reply
Re: exclusive lock problem In reply to
vampy wrote...

In Reply To:
If the server is running on WinNT, then that might be the problem.
That is not correct. Flock does not work in Windows 9x servers. It DOES work in Windows NT and Windows 2000.

Regards,

Eliot Lee

Quote Reply
Re: exclusive lock problem In reply to
Opps... :P Looks like I got my info all mixed up. I knew that Windows can't work and I assume that if it's running on a server, it shouldn't be using Win9X. I know that Win9X doesn't work as I'm using Win9X wiht Xitami software to test my scripts out.

Sorry.

Julian