php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13660 store extra data in db file on create
Submitted: 2001-10-13 11:49 UTC Modified: 2002-09-21 02:09 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: pierre-alain dot joye at wanadoo dot fr Assigned:
Status: No Feedback Package: DBM/DBA related
PHP Version: 4.0.6 OS: Linux kernel 2.4.10 i686
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
17 - 1 = ?
Subscribe to this entry?

 
 [2001-10-13 11:49 UTC] pierre-alain dot joye at wanadoo dot fr
Show the script below the text.

When I create a new db file, extras data has been stored. 
In all cases, it was the script itself (ask me if you need 
the new db file directly).
I think it's a bug (or a new backup feature ;).

Config details :
gdbm 1.8.0
libc6
kernel 2.4.10
data on a reiserfs partition

Is it due to a default filesize ?
If yes do you make a zero fill of the extra memory used ?

<?
$id = dba_open("/tmp/test2.db","n","gdbm");
if(!$id){
	echo "Erreur dba_open";
	exit;
}
dba_replace("key","This a test!",$id);
if(dba_exists("key",$id)){
	echo dba_fetch("key",$id);
}else{
	echo "Not found";
}
dba_close($id);
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-29 09:22 UTC] davidtaylor at pobox dot com
I have seen the same thing.  It only seems to happen to me when I am including other php files.  If I take out all require()'s, the db is zero'ed out again.

Any suggestions?
 [2002-06-11 08:25 UTC] davidtaylor at pobox dot com
For anyone else with this problem:

Apparently calling the optimize function immediately after the create will set everything back to nulls so the script itself is removed:

$dbRC = dba_optimize($dbID);

I would still like to know how the default size is determined of the database file.  I guess I will look for that info on GNU sites though.
 [2002-08-28 12:57 UTC] kalowsky@php.net
think you can try a recent non-stable snapshot?
 [2002-09-21 02:09 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 17:01:30 2024 UTC