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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: volk at pcservice-direkt dot de
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC