help confirming a PDO_SQLITE bug



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] help confirming a PDO_SQLITE bug
    ... I've just compiled from that extension from CVS, changing nothing else, and the bug is gone. ... After the upgrade any SELECT returns all its values with the last character missing. ... 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? ...
    (php.general)
  • Re: New PHP Releases and PDO SQLite
    ... current release of PHP and in the CVS for PHP5.1.* and 5.2.* the ... SQLite source version only stands at 3.2.8, while the actual realease is now ... I'm going to guess PDO simply uses the version of SQLite that PHP ...
    (comp.lang.php)
  • Re: [PHP] Why I sart getting "Fatal error: Allowed memory size..." after php upgrade?
    ... I usually have to update some of my config files after an upgrade. ... It is my opinion that you, as a PHP ... Subject: Why I sart getting "Fatal error: Allowed memory size..." ... I contacted Tech. Support and he told me I have to edit ...
    (php.general)
  • Re: HELP - Cant change Include Path
    ... not the php directory as I assumed, but I corrected the path on both. ... Registered Stream Filters convert.iconv.*, string.rot13, ... Directive Local Value Master Value ... PDO Driver for SQLite 3.x enabled ...
    (comp.lang.php)
  • Re: sqlite2 vs sqlite3
    ... I believe sqlite: defaults to version 2. ... is that php5.ini are the suggested settings for PHP version 5. ... like you might have a version of XAMPP installed which I think installs ... Apache Version 2 supports ...
    (comp.lang.php)