Reply to Re: [PHP] dba_open(), NFS & file locking test please

Your name:

Reply:


Posted by Gerard Samuel on 10/06/52 11:05

Gerard Samuel wrote:

> If you have php installed with the dba extension, and have access to NFS,
> could you try out the code below, to see if it works for you.
> Doesn't matter what OS you're using (as long as the OS professes its
> capable
> of locking over NFS).
>
> Im currently using FreeBSD 5.3 (server & client), with NFS & the lockd
> daemon running.
>
> Dummy code ->
> <?php
> var_dump(dba_open('/path/to/nfs_mount/foo.dat', 'c', 'gdbm'));die;
> ?>
>
> Gives me ->
> Warning: dba_open(/path/to/nfs_mount/foo.dat,c) [function.dba-open]:
> Driver initialization failed for handler: gdbm: Can't be writer in
> /usr/home/gsam/www/index.php on line 2
> bool(false)
>
> It creates the file, but Im guessing that its unable to get a lock on it.
>
> Im trying to figure out who is to blame for the failure.


Well I figured out who is to blame for the failure.
The man in the mirror :(
I didn't have lockd running on the client box.
But now it is working correctly, so there is no need to run the test.
Thanks

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация