|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37461 Meaningless notice from dba w/db4 via apache2handler
Submitted: 2006-05-16 14:02 UTC Modified: 2006-05-17 14:02 UTC
From: volk at pcservice-direkt dot de Assigned:
Status: Not a bug Package: DBM/DBA related
PHP Version: 5.1.4 OS: Linux 2.6.15-1-686
Private report: No CVE-ID: None
 [2006-05-16 14:02 UTC] volk at pcservice-direkt dot de
PHP prints the following message:
?Notice:  Unknown:  \xac\x13\xb7(null) in Unknown on line 0?
  * 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:
$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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-17 14:02 UTC]
This happens because Apache changes CWD on request shutdown.
Either call dba_close() on script end or use an absolute file path.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 25 07:01:31 2024 UTC