ID: 48240 Updated by: j...@php.net Reported By: VJTD3 at VJTD3 dot com -Status: Open +Status: Feedback Bug Type: DBM/DBA related Operating System: linux redhat fedora 10 PHP Version: 5.2.9 New Comment:
Could you provide a test db (or does this happen with any?) somewhere? And/or a gdb backtrace of the crash? Previous Comments: ------------------------------------------------------------------------ [2009-05-12 03:29:22] VJTD3 at VJTD3 dot com Description: ------------ DBA Segmentation fault on function dba_nextkey without dba_firstkey before dba_nextkey. Reproduce code: --------------- ./configure --enable-dba --with-db4 --disable-libxml --disable-dom --disable-simplexml --disable-libxml --disable-xml --disable-xmlreader --disable-xmlwriter --without-pear <?php $dba = dba_open('database', 'r', 'db4'); $key = dba_nextkey($dba); echo $key.':'.dba_fetch($key, $dba)."\n"; ?> db4-4.7.25-7 Expected result: ---------------- the first key by default or at least a error vs seg fault. (yes, i know dba_firstkey should be before dba_nextkey however segfaults are probably not a good reaction, defaulting to the first record or a error is better...) Actual result: -------------- seg fault ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48240&edit=1