ID:               51086
 User updated by:  seanius at debian dot org
-Summary:          will not work with libdb4.8
 Reported By:      seanius at debian dot org
 Status:           Open
 Bug Type:         DBM/DBA related
-Operating System: *
+Operating System: Debian (and others)
-PHP Version:      5.3, 6 (2010-02-19)
+PHP Version:      5.3.1
 New Comment:

sorry for all the noise, when trying the latest snapshot it apparently
unpacked on top of a previous snapshot in which i had been investigating
the issue.  the tests fail in the new snapshot with more than just the
NOTICE error (i had been playing with the open flags as mentioned
previously).  the actual failure  diff looks like:

TEST 1/25 [ext/dba/tests/bug36436.phpt]
========DIFF========
001+ Notice: dba_popen(): fop_read_meta:
/home/sean/Download/php5.3-201002190730/ext/dba/tests/test0.dbm:
unexpected file type or format in
/home/sean/Download/php5.3-201002190730/ext/dba/tests/bug36436.php on
line 6
002+ 
003+ Notice: dba_popen():
/home/sean/Download/php5.3-201002190730/ext/dba/tests/test0.dbm: Invalid
type 5 specified in
/home/sean/Download/php5.3-201002190730/ext/dba/tests/bug36436.php on
line 6
004+ 
005+ Warning:
dba_popen(/home/sean/Download/php5.3-201002190730/ext/dba/tests/test0.dbm,c):
Driver initialization failed for handler: db4: Invalid argument in
/home/sean/Download/php5.3-201002190730/ext/dba/tests/bug36436.php on
line 6
001- resource(%d) of type (dba persistent)
002- string(3) "XYZ"
003- string(1) "X"
004- string(1) "Y"
005- ===DONE===


Previous Comments:
------------------------------------------------------------------------

[2010-02-19 08:45:00] [email protected]

-Summary: will not build/work with libdb4.8
+Summary: will not work with libdb4.8
-Operating System: Debian (and others)
+Operating System: *
-PHP Version: 5.3.1
+PHP Version: 5.3, 6 (2010-02-19)

At least it builds now. :)

------------------------------------------------------------------------

[2010-02-19 08:43:12] seanius at debian dot org

oops, looks like there was a little race there.  yes i can see the
behavior in the snapshot too:

rangda[/home/sean/Download/php5.3-201002160730] ./run-tests.php -p
./sapi/cli/php --show-diff ext/dba/tests/bug36436.phpt

=====================================================================
PHP         : ./sapi/cli/php 
PHP_SAPI    : cli
PHP_VERSION : 5.3.3-dev
ZEND_VERSION: 2.3.0
PHP_OS      : Linux - Linux rangda 2.6.32-trunk-amd64 #1 SMP Sun Jan 10
22:40:40 UTC 2010 x86_64
INI actual  : /home/sean/Download/php5.3-201002160730
More .INIs  :  
CWD         : /home/sean/Download/php5.3-201002160730
Extra dirs  : 
VALGRIND    : Not used
=====================================================================
Running selected tests.
TEST 1/1 [ext/dba/tests/bug36436.phpt]
========DIFF========
001+ Notice: dba_popen(): fop_read_meta:
/home/sean/Download/php5.3-201002160730/ext/dba/tests/test0.dbm:
unexpected file type or format in
/home/sean/Download/php5.3-201002160730/ext/dba/tests/bug36436.php on
line 6
========DONE========
FAIL Bug #36436 (DBA problem with Berkeley DB4)
[ext/dba/tests/bug36436.phpt] 
=====================================================================
Number of tests :    1                 1
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    1 (100.0%) (100.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :    0 (  0.0%) (  0.0%)
---------------------------------------------------------------------
Time taken      :    0 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #36436 (DBA problem with Berkeley DB4)
[ext/dba/tests/bug36436.phpt]
=====================================================================

------------------------------------------------------------------------

[2010-02-19 08:36:51] seanius at debian dot org

-Status: Feedback
+Status: Open

and i've now asked in the bdb forums what they think:

http://forums.oracle.com/forums/thread.jspa?threadID=1031805&stqc=true

------------------------------------------------------------------------

[2010-02-19 08:32:31] [email protected]

-Status: Open
+Status: Feedback

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

------------------------------------------------------------------------

[2010-02-18 23:46:46] seanius at debian dot org

a little more info:  afaict the file is being created with zero size
via some stream functions in dba.c.  when db->open() is called with
DB_CREATE|DB_TRUNCATE libdb4.8 tries to read some metadata from the
existing file and fails horribly.  i tried playing around with the flags
(passing only DB_TRUNCATE does not work, passing only DB_CREATE seems to
work but still produces the error message).

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/51086

-- 
Edit this bug report at http://bugs.php.net/?id=51086&edit=1

Reply via email to