Re: [PHP] help confirming a PDO_SQLITE bug



Thanks to anyone who entertained my previous email, but I've solved my own problem.

It looks like the bug is in PDO_SQLITE 1.0.1. I've just compiled from that extension from CVS, changing nothing else, and the bug is gone.

--rick

Rick Fletcher wrote:
I've just upgraded to Fedora Core 6 and my personal site broke. Along with the upgrade came PHP 5.1.6 and SQLite 3.3.6. After the upgrade any SELECT returns all its values with the last character missing.

I've filed a bug at pecl.php.net (http://pecl.php.net/bugs/bug.php?id=9191), but it doesn't look as though that's reviewed very often. I need help confirming that it is a PDO or SQLite bug so that I can begin upgrading or downgrading to avoid it.

If you have matching versions of PHP and/or SQLite, can you try out the test script below and see if it's broken in the same way?

Thanks,
Rick Fletcher

Reproduce code:
---------------
<?php
$dbh = new PDO( 'sqlite::memory:' );

$dbh->query( 'CREATE TABLE "things" ( name VARCHAR NOT NULL )');
$dbh->query( 'INSERT INTO things VALUES ( "thing one" )');

foreach( $dbh->query( 'SELECT * FROM things' ) as $row ) {
print_r( $row );
}
$dbh = null;
?>

Expected result:
----------------
Array
(
[name] => thing one
[0] => thing one
)

Actual result:
--------------
Array
(
[name] => thing on
[0] => thing on
)

.



Relevant Pages

  • Re: php extensions compile error - another compile bug?
    ... Re: php extensions compile error - another compile bug?: ... Is not triviality is a matter of perspective? ... AFFECTS: users of PHP ... and shared extensions to allow more flexibility and add new features. ...
    (freebsd-questions)
  • Re: [Full-Disclosure] How secure is PHP ?
    ... > quick look at security focus, searching the vuln db for PHP, nothing more ... Looking at the Official PHP Bug list I am ... The PROGRAMMER is always supposed to validate user supplied ... validate the input it feeds to file system functions it is programmer error. ...
    (Full-Disclosure)
  • Re: Undefined Index notices
    ... I didn't say that it was a bug.. ... These are the first 3 lines of the script that gets posted to.. ... there is nothing but good php there. ... working with a n00b.. ...
    (comp.lang.php)
  • Re: List Fails on some computers - www missing in url
    ... Yes it is - for any domain issued - denying that simple fact allows PHP ... Why is this a security bug, whereas a user being able to erase his ... session cookie at any time and start a new session ISN'T just as ... NS records pointing at the DNS hosting company the domain owner is ...
    (comp.lang.php)
  • Re: Novice needs help :)
    ... you might want to either learn PHP or hire a consultant to give you a hand. ... Also, here on Usenet, we help people - but those people also need to be helping themselves. ... I don't have the several hours it could take to chase down a bug in that large of a chunk of code, and I doubt many people here do. ... I'd have to recreate your database, load it with data, then start testing. ...
    (comp.lang.php)