php.net |  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
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-17 14:02 UTC] mike@php.net
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-2019 The PHP Group
All rights reserved.
Last updated: Fri May 24 07:01:26 2019 UTC