#18746 [NEW]: DBM query cuts string
| From: | t2315 at freemail dot hu | Date: | Mon, 05 Aug 2002 19:28:16 +0000 |
| Subject: | #18746 [NEW]: DBM query cuts string | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-16023@lists.php.net to get a copy of this message | ||
From: t2315@freemail.hu
Operating system: Windows
PHP version: 4.2.2
PHP Bug Type: DBM/DBA related
Bug description: DBM query cuts string
I'm using PHP 4.2.2 for Windows with Apache 1.3.24.
I have loaded php_db.dll for DBM support.
When writing to a DBM database and re-reading data, I get different from
that I inserted. Here is a script to reproduce the problem:
[please delete "db" & "db.lck" if exists]
<? $dbm=dbmopen("db","c") or die("DBM error");
dbmreplace($dbm,"7","alpha");
echo dbmfetch($dbm,"7");
dbmclose($dbm); ?>
The program output is "lpha" (w/o quotes). The starting "a" seems to be
cut. When analyzing the "db" file, it contains the whole string (31 0A 37
35 0A 61 6C 70 68 61 00).
I'm not completely sure if it is a php bug, I'm also interested whether
you can reproduce the error or not.
--
Edit bug report at http://bugs.php.net/?id=18746&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18746&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18746&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18746&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18746&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18746&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18746&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18746&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18746&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18746&r=globals