Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7130 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45060 invoked by uid 1010); 15 Jan 2004 19:42:06 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 45006 invoked from network); 15 Jan 2004 19:42:05 -0000 Received: from unknown (HELO shiva.mind.de) (212.42.230.204) by pb1.pair.com with SMTP; 15 Jan 2004 19:42:05 -0000 Received: from [192.168.1.100] (p508EB219.dip.t-dialin.net [80.142.178.25]) by shiva.mind.de (Postfix) with ESMTP id 26BD397B66; Thu, 15 Jan 2004 20:41:59 +0100 (CET) Date: Thu, 15 Jan 2004 20:39:58 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <102109045968.20040115203958@marcus-boerger.de> To: Martin Kraemer Cc: internals@lists.php.net In-Reply-To: <20040115170830.GA60445@deejai2.mch.fsc.net> References: <20040115170830.GA60445@deejai2.mch.fsc.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP 4.3.5RC1 and dba(db4) From: helly@php.net (Marcus Boerger) Hello Martin, Thursday, January 15, 2004, 6:08:31 PM, you wrote: > Hello, > I am noticing a strange effect in php-4.3.5RC1 while using > dba_open("name", "c", "db4") -- this used to work in php-4.3.3 > (I have both libphp4.so versions and can switch between them) > but it fails in php-4.3.5RC1 with the error message: > Warning: dba_open(...,c): > Driver initialization failed for handler: db4: Unable to establish lock > (no matter if I use "c", "cd" or "ct" for the flags). The only > possibility to get it working is by using "c-" for $flags. > Note that in ext/dba/dba_db4.c, I see some clues about a > db4-internal locking: > --snip--dba_db4.c::DBA_OPEN_FUNC(db4) > #ifdef DB_FCNTL_LOCKING > gmode |= DB_FCNTL_LOCKING; > #endif > --snip-- > so I tried to change the handler[] for db4 to: > --snip--dba.c::handler[] > #if DBA_DB4 > #ifdef DB_FCNTL_LOCKING > DBA_HND(db4, DBA_LOCK_EXT) /* Locking done in library if set */ > #else > DBA_HND(db4, DBA_LOCK_ALL) /* No lock in lib */ > #endif > #endif > --snip-- > but that doesn't change the observed behaviour. > Is it *my* error, or is something really broken in php-4.3.5RC1? Nice idea but DB_FCNTL_LOCKING has a different meaning. It says go use the lock that is already set from the process. And it does not mean do create a lock. What version of db4 do you have? Is it compiled by your own? are you using a dba.so? Are you testing on a standard linux fs (extfs3) or what? -- Best regards, Marcus mailto:helly@php.net