|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56154 Bug in sqlite_escape_string function
Submitted: 2004-08-01 11:00 UTC Modified: 2012-06-11 13:42 UTC
From: lay at amiga dot hu Assigned: felipe (profile)
Status: Closed Package: SQLite (PECL)
PHP Version: 4.3.3 OS: Linux
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: lay at amiga dot hu
New email:
PHP Version: OS:


 [2004-08-01 11:00 UTC] lay at amiga dot hu
I try this code on three different systems (different PHP versions, Debian/Red Hat, etc.), but the SQLite version always 1.0.3 (libversion 2.8.14). Earlier versions works well. But this new version the result is the same:

Sometimes runs until end, but sometimes, different places generate warnings. I mean, the bug in the sqlite_escape_string function, if passed an empty string.

If no warnings, try to increase the loop counter.

Reproduce code:



echo "<h1>Libversion: ".sqlite_libversion()."</h1>";


sqlite_query(CONN,"create table lufi(duma)");

echo "<h1>Start</h1>";

for ($i=1;$i<=100;$i++) {
 sqlite_query(CONN,"insert into lufi(duma)values('".sqlite_escape_string("")."')");

echo "<h1>End</h1>";

$h=sqlite_query(CONN,"select count(*)hany from lufi");
echo $t["hany"]." success.";



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-19 03:25 UTC] hhhahn at gmail dot com
Ouch, I got bit hard by this bug as well. It's ref'd in the mainline PHP bugs here:

There's a diff for a fix mentioned in that entry here:

Fixed it for me.
 [2012-06-11 13:42 UTC]
Already fixed.
 [2012-06-11 13:42 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 18 05:03:36 2021 UTC