Gossamer Forum
Home : Products : DBMan : Installation :

HELP - File Locking Problem

Quote Reply
HELP - File Locking Problem
Hi Everyone . . . again.

Another issue that requires your much appreciated help and advice.

DBman is running smoothly on my web hosting server providing 'file locking' (FLOCK) is turned off. If I turn it on I get the debugging message:

'unable to get exclusive file lock on default.db'

I phoned my ISP any they have told me that the FLOCK function will not work on their server and that I should substitute the FCNTL function.

Can anyone advise me on how to substitute the function and whether it will work?

Thanks in advance.

Keef

Quote Reply
Re: HELP - File Locking Problem In reply to
keef:

As in the readme file for DBMan I believe it states that file locking will not work on NT servers.

I'm sure all that is necessary is to turn off this feature within your db.cfg file:

$db_use_flock = 0;

The script should still run fine, but you may want to search the forums for $db_use_flock if you have any other concerns or want to know what others may have said regarding this.

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: HELP - File Locking Problem In reply to
Hi again Lois,

Thanks for your reply.

DBman does run fine with file locking switched off but if it is to be multiple user then file locking needs to be switched on to prevent possible corruption of the default.db file. My service provider is running UNIX.

I did the search as you suggest for'flock' but that only reveals what I already appear to know.

Do you have any suggestions on where I could find out more on this 'FCNTL' function to replace the 'FLOCK' function? . . . I'm willing to have a go if its feasible.

Keef

Quote Reply
Re: HELP - File Locking Problem In reply to
I didn't answer this before because I had no information to give you. I don't really have much now, except for what's in "Programming Perl." It's a lot to type in and I don't understand it.

My best suggestion is to ask about it in the Perl/CGI forum.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: HELP - File Locking Problem In reply to
Thanks for the tip on the Perl/CGI forum. There were some useful threads there and even somebody with a similar problem.

I have posted a message there, so I'll keep you in touch with progress.

Thanks again.

Keef