#40211 [Opn->Fbk]: dba_firstkey segfaults when used with mod_php5
| From: | tony2001@php.net | Date: | Tue, 23 Jan 2007 21:05:21 +0000 |
| Subject: | #40211 [Opn->Fbk]: dba_firstkey segfaults when used with mod_php5 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-107954@lists.php.net to get a copy of this message | ||
ID: 40211
Updated by: tony2001@php.net
Reported By: stuhood at webmail dot us
-Status: Open
+Status: Feedback
Bug Type: DBM/DBA related
Operating System: Red Hat w/ 2.4.21-32.0.1.EL
PHP Version: 5.2.0
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Cannot reproduce with both CLI and Apache.
Previous Comments:
------------------------------------------------------------------------
[2007-01-23 20:38:58] stuhood at webmail dot us
Alright, here's a link to the database, but as I said: this script (and
others) execute just fine from the command line.
http://www.webmail.us/misc/spamrules.db
------------------------------------------------------------------------
[2007-01-23 14:51:50] tony2001@php.net
We also need this thedatabase.db, please put it somewhere and put the
URL here.
------------------------------------------------------------------------
[2007-01-23 14:40:29] stuhood at webmail dot us
Description:
------------
This bug affects 5.1.4, 5.2.0 and latest CVS on this system, compiled
with "--enable-dba=shared --with-db4=/usr/local/BerkeleyDB.4.5/" (or
4.3), and with the dba shared extension in my php.ini file. httpd
version is Apache/2.0.46.
php run-tests.php ext/dba runs without
errors.
Permissions:
-rw-r--r-- thedatabase.db
Reproduce code:
---------------
The following script works correctly from the command line, but causes
httpd processes to segfault. With a dba_exists call instead of
firstkey, it works fine, so I'm fairly certain its a problem with
firstkey:
<?php
$db = dba_open("thedatabase.db", "r", "db4");
$key = dba_firstkey ($db);
if($db)
print "Success: ".$key."\n";
dba_close($db);
?>
Expected result:
----------------
Should see Success: (first key)
Actual result:
--------------
httpd child segfaults (11) and displays a 500 error.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40211&edit=1