#37461 [Opn->Bgs]: Meaningless notice from dba w/db4 via apache2handler

From: Date: Wed, 17 May 2006 14:02:39 +0000
Subject: #37461 [Opn->Bgs]: Meaningless notice from dba w/db4 via apache2handler
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-97261@lists.php.net to get a copy of this message
ID: 37461 Updated by: mike@php.net Reported By: volk at pcservice-direkt dot de -Status: Open +Status: Bogus Bug Type: DBM/DBA related Operating System: Linux 2.6.15-1-686 PHP Version: 5.1.4 New Comment: This happens because Apache changes CWD on request shutdown. Either call dba_close() on script end or use an absolute file path. Previous Comments: ------------------------------------------------------------------------ [2006-05-16 14:02:21] volk at pcservice-direkt dot de Description: ------------ PHP prints the following message: »Notice: Unknown: \xac\x13\xb7(null) in Unknown on line 0« if * the script is running via apache2handler * and the dba handler is db4 * and the dba file does not yet exists The problem will not occur if another dba handler is used, or the script is executed via PHP's cli. Reproduce code: --------------- <?php $dba = dba_open('db4.db', 'c', 'db4'); dba_insert('question', 'bug or feature?', $dba); dba_insert('answer', '42', $dba); printf("%s\n", dba_fetch('question', $dba)); ?> Expected result: ---------------- bug or feature? Actual result: -------------- bug or feature? Notice: Unknown: \xac\x13\xb7(null) in Unknown on line 0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37461&edit=1

« previous php.bugs (#97261) next »