#18746 [Opn]: DBM query cuts string
| From: | t2315 at freemail dot hu | Date: | Mon, 05 Aug 2002 19:51:29 +0000 |
| Subject: | #18746 [Opn]: DBM query cuts string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-16024@lists.php.net to get a copy of this message | ||
ID: 18746
User updated by: t2315@freemail.hu
Reported By: t2315@freemail.hu
Status: Open
Bug Type: DBM/DBA related
-Operating System: Windows
+Operating System: Windows 2000
PHP Version: 4.2.2
New Comment:
I forgot to tell that I'm using Windows 2000 Professional
Previous Comments:
------------------------------------------------------------------------
[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