php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35073 dba_open(test.db,n): Driver initialization failed for handler: db4: Invalid argu
Submitted: 2005-11-02 22:38 UTC Modified: 2005-12-17 15:51 UTC
From: marrtins at hackers dot lv Assigned: helly (profile)
Status: Closed Package: DBM/DBA related
PHP Version: 5CVS-2005-11-03 (snap) OS: Linux libc.2.3.2
Private report: No CVE-ID: None
 [2005-11-02 22:38 UTC] marrtins at hackers dot lv
Description:
------------
As i migrated from php4 (4.3.9) to php5 (5.0.5, 5.0.4) every file system function (fopen, dba_open, etc) cannot read/write files. Empty file can be created - but can`t write any byte there.

Not using any loaders or encoders or similar modules.

When recompiled back to 4.3.9 all works fine. The same happens when compiled as apache module - 4.3.9 works fine, 5.0.5 and 5.0.4 not.

Reproduce code:
---------------
Example can be found here - http://paste.php.lv/2785

compile script:
export LDFLAGS=-liconv && ./configure
make
make install

Linux libc-2.3.2

gcc -v
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/specs
Configured with: ../gcc-3.3.4/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 3.3.4



Expected result:
----------------
Expecting file `haha` to be created with contents `aa`. Also db4 database with some entries.

Actual result:
--------------
fopen() reports `failed to open stream: Inappropriate ioctl for device`

dba_open() reports `Driver initialization failed for handler: db4`



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-03 22:21 UTC] marrtins at hackers dot lv
I found that fopen() part was not working by my fault. I was specified open mode as `c` no `w`.

PHP example: http://paste.php.lv/2797/nonum
Result:
Warning: dba_open(test.db,n): Driver initialization failed for handler: db4: Invalid argument in /data2/src/php5-200511030730/sapi/cli/test.php on line 3

using db-4.3.29 (www.sleepycat.com)

I felt back to db-4.2.52 and recompiled now working fine. Is there problem with db-4.3.29 package?
 [2005-11-03 22:36 UTC] sniper@php.net
Marcus, any ideas about this?

 [2005-11-03 22:50 UTC] helly@php.net
After reading this report several times i finally got to the point that the problem is the usage of 4.3. Obviously there is another change in the Sleepycat libs i have to check.
 [2005-12-12 19:53 UTC] helly@php.net
Can you please try with latest CVS version of PHP 5 again just to make sure there wasn't some influence from some other thing i just fixed.
 [2005-12-17 15:51 UTC] helly@php.net
Works with 5.1.2-dev, db-4.3.21, glibc-2.3.5.
Should you find more trouble using newer db-4.3 feel free to reopen - but test with updated php first.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 14 18:01:27 2024 UTC