|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7555 flatfile dbmfetch loses first char if datum length exceeds 9 chars
Submitted: 2000-10-31 15:20 UTC Modified: 2000-12-04 12:16 UTC
From: yoshinori dot kawahara at compaq dot com Assigned:
Status: Closed Package: DBM/DBA related
PHP Version: 4.0.3pl1 OS: NT4 SP4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: yoshinori dot kawahara at compaq dot com
New email:
PHP Version: OS:


 [2000-10-31 15:20 UTC] yoshinori dot kawahara at compaq dot com
    $db = dbmopen('req.db', "n");
    $in = "1234567890";
    dbminsert($db, "ID", $in);
    $out = dbmfetch($db, "ID");
    echo "in  -$in-\n";
    echo "out -$out-\n";

am using the distribution "Win32 Binaries packaged as zip" from
filename :

save code as say db.php3
run in dos window to exclude interference from webserver

d:\tmp>\php\php.exe db.php3
X-Powered-By: PHP/4.0.3pl1
Content-type: text/html

in  -1234567890-
out -234567890-

As you can see the first char is dropped. For anything up to 9 chars everythings OK. More than 9, first char is dropped. Tried using all alhpa strings, same behaviour. 
Looked at req.db flat file database, everything looks ok there. 



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-20 12:03 UTC]
 [2000-12-04 12:16 UTC]
The db extension is deprecated. 
Use dba extension instead.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 21 08:01:27 2024 UTC