#18746 [Ver->Csd]: DBM query cuts string
| From: | kalowsky@php.net | Date: | Tue, 13 Aug 2002 04:10:42 +0000 |
| Subject: | #18746 [Ver->Csd]: DBM query cuts string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-16568@lists.php.net to get a copy of this message | ||
ID: 18746
Updated by: kalowsky@php.net
Reported By: t2315@freemail.hu
-Status: Verified
+Status: Closed
Bug Type: DBM/DBA related
Operating System: Windows 2000
PHP Version: 4.2.2
New Comment:
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a
documentation
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-08-12 23:46:23] kalowsky@php.net
Can be reproduced in CVS on Win2k
------------------------------------------------------------------------
[2002-08-05 18:31:51] t2315@freemail.hu
(1) Seems to be very similar to bugreport 16190
(2) Truncation looks dependent on key string length
------------------------------------------------------------------------
[2002-08-05 15:51:28] t2315@freemail.hu
I forgot to tell that I'm using Windows 2000 Professional
------------------------------------------------------------------------
[2002-08-05 15:28:15] t2315@freemail.hu
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 this bug report at http://bugs.php.net/?id=18746&edit=1