Professional Web Applications Themes

#38976 [NEW]: missing last character when fetching query - PHP Bugs

From: zolfi at parspooyesh dot com Operating system: fedora linux 5 PHP version: 5.1.6 PHP Bug Type: PDO related Bug description: missing last character when fetching query Description: ------------ when using SELECT statement for selecting rows of table, and using fetchAll(or fetch) method the last character of each row will be lost. Reproduce code: --------------- $db_location = "table.sqlite"; $db = new PDO("sqlite:{$db_location}"); $db->query("create table my_table (name text);"); // table is empty $query = $db->query("delete from my_table"); $query = $db->query("insert into my_table (name) values ('123')"); $query = $db->query("select name from my_table"); while ($row = $query->fetch()) { print_r($row); } Expected result: ---------------- ...

  1. #1

    Default #38976 [NEW]: missing last character when fetching query

    From: zolfi at parspooyesh dot com
    Operating system: fedora linux 5
    PHP version: 5.1.6
    PHP Bug Type: PDO related
    Bug description: missing last character when fetching query

    Description:
    ------------
    when using SELECT statement for selecting rows of table, and
    using fetchAll(or fetch) method the last character of each row will be
    lost.


    Reproduce code:
    ---------------
    $db_location = "table.sqlite";

    $db = new PDO("sqlite:{$db_location}");

    $db->query("create table my_table (name text);");
    // table is empty
    $query = $db->query("delete from my_table");

    $query = $db->query("insert into my_table (name) values ('123')");

    $query = $db->query("select name from my_table");

    while ($row = $query->fetch())
    {
    print_r($row);
    }


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


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


    --
    Edit bug report at [url]http://bugs.php.net/?id=38976&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=38976&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=38976&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=38976&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=38976&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=38976&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=38976&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=38976&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=38976&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=38976&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=38976&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=38976&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=38976&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=38976&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=38976&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=38976&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=38976&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=38976&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=38976&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=38976&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=38976&r=mysqlcfg[/url]
    zolfi at parspooyesh dot com Guest

  2. #2

    Default #38976 [Com]: missing last character when fetching query

    ID: 38976
    Comment by: jason at southerntextile dot com
    Reported By: zolfi at parspooyesh dot com
    Status: No Feedback
    Bug Type: PDO related
    Operating System: fedora linux 5
    PHP Version: 5.1.6
    New Comment:

    Since doing a fresh install of Fedora 6. This is occuring on all my
    SQLite databases (using PDO).


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-10-05 01:00:00] php-bugs at lists dot php dot net

    No feedback was provided for this bug for over a week, so it is
    being suspended automatically. If you are able to provide the
    information that was originally requested, please do so and change
    the status of the bug back to "Open".

    ------------------------------------------------------------------------

    [2006-09-27 16:57:56] [email]tony2001php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]

    Can't reproduce.

    ------------------------------------------------------------------------

    [2006-09-27 16:52:29] zolfi at parspooyesh dot com

    Description:
    ------------
    when using SELECT statement for selecting rows of table, and
    using fetchAll(or fetch) method the last character of each row will be
    lost.


    Reproduce code:
    ---------------
    $db_location = "table.sqlite";

    $db = new PDO("sqlite:{$db_location}");

    $db->query("create table my_table (name text);");
    // table is empty
    $query = $db->query("delete from my_table");

    $query = $db->query("insert into my_table (name) values ('123')");

    $query = $db->query("select name from my_table");

    while ($row = $query->fetch())
    {
    print_r($row);
    }


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


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



    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=38976&edit=1[/url]
    jason at southerntextile dot com Guest

  3. #3

    Default #38976 [Com]: missing last character when fetching query

    ID: 38976
    Comment by: jason at southerntextile dot com
    Reported By: zolfi at parspooyesh dot com
    Status: No Feedback
    Bug Type: PDO related
    Operating System: fedora linux 5
    PHP Version: 5.1.6
    New Comment:

    Make that two differnt Fedora 6 servers with the same problem now (PHP
    5.1.6 /w PDO).


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-10-27 20:04:45] jason at southerntextile dot com

    Since doing a fresh install of Fedora 6. This is occuring on all my
    SQLite databases (using PDO).

    ------------------------------------------------------------------------

    [2006-10-05 01:00:00] php-bugs at lists dot php dot net

    No feedback was provided for this bug for over a week, so it is
    being suspended automatically. If you are able to provide the
    information that was originally requested, please do so and change
    the status of the bug back to "Open".

    ------------------------------------------------------------------------

    [2006-09-27 16:57:56] [email]tony2001php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]

    Can't reproduce.

    ------------------------------------------------------------------------

    [2006-09-27 16:52:29] zolfi at parspooyesh dot com

    Description:
    ------------
    when using SELECT statement for selecting rows of table, and
    using fetchAll(or fetch) method the last character of each row will be
    lost.


    Reproduce code:
    ---------------
    $db_location = "table.sqlite";

    $db = new PDO("sqlite:{$db_location}");

    $db->query("create table my_table (name text);");
    // table is empty
    $query = $db->query("delete from my_table");

    $query = $db->query("insert into my_table (name) values ('123')");

    $query = $db->query("select name from my_table");

    while ($row = $query->fetch())
    {
    print_r($row);
    }


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


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



    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=38976&edit=1[/url]
    jason at southerntextile dot com Guest

  4. #4

    Default #38976 [Com]: missing last character when fetching query

    ID: 38976
    Comment by: jason at southerntextile dot com
    Reported By: zolfi at parspooyesh dot com
    Status: No Feedback
    Bug Type: PDO related
    Operating System: fedora linux 5
    PHP Version: 5.1.6
    New Comment:

    Latest Fedora RPMs (compilied Nov. 2) still affected by bug.


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-10-27 21:23:44] jason at southerntextile dot com

    Make that two differnt Fedora 6 servers with the same problem now (PHP
    5.1.6 /w PDO).

    ------------------------------------------------------------------------

    [2006-10-27 20:04:45] jason at southerntextile dot com

    Since doing a fresh install of Fedora 6. This is occuring on all my
    SQLite databases (using PDO).

    ------------------------------------------------------------------------

    [2006-10-05 01:00:00] php-bugs at lists dot php dot net

    No feedback was provided for this bug for over a week, so it is
    being suspended automatically. If you are able to provide the
    information that was originally requested, please do so and change
    the status of the bug back to "Open".

    ------------------------------------------------------------------------

    [2006-09-27 16:57:56] [email]tony2001php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]

    Can't reproduce.

    ------------------------------------------------------------------------

    [2006-09-27 16:52:29] zolfi at parspooyesh dot com

    Description:
    ------------
    when using SELECT statement for selecting rows of table, and
    using fetchAll(or fetch) method the last character of each row will be
    lost.


    Reproduce code:
    ---------------
    $db_location = "table.sqlite";

    $db = new PDO("sqlite:{$db_location}");

    $db->query("create table my_table (name text);");
    // table is empty
    $query = $db->query("delete from my_table");

    $query = $db->query("insert into my_table (name) values ('123')");

    $query = $db->query("select name from my_table");

    while ($row = $query->fetch())
    {
    print_r($row);
    }


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


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



    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=38976&edit=1[/url]
    jason at southerntextile dot com Guest

  5. #5

    Default #38976 [Com]: missing last character when fetching query

    ID: 38976
    Comment by: kae at verens dot com
    Reported By: zolfi at parspooyesh dot com
    Status: No Feedback
    Bug Type: PDO related
    Operating System: fedora linux 5
    PHP Version: 5.1.6
    New Comment:

    I have this error as well, and have been pulling my hair out for the
    last few days trying to figure out what was wrong with my code...

    FC6, php-5.1.6-3.1.fc6, php-pdo-5.1.6-3.1.fc6


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-11-06 17:49:06] jason at southerntextile dot com

    Latest Fedora RPMs (compilied Nov. 2) still affected by bug.

    ------------------------------------------------------------------------

    [2006-10-27 21:23:44] jason at southerntextile dot com

    Make that two differnt Fedora 6 servers with the same problem now (PHP
    5.1.6 /w PDO).

    ------------------------------------------------------------------------

    [2006-10-27 20:04:45] jason at southerntextile dot com

    Since doing a fresh install of Fedora 6. This is occuring on all my
    SQLite databases (using PDO).

    ------------------------------------------------------------------------

    [2006-10-05 01:00:00] php-bugs at lists dot php dot net

    No feedback was provided for this bug for over a week, so it is
    being suspended automatically. If you are able to provide the
    information that was originally requested, please do so and change
    the status of the bug back to "Open".

    ------------------------------------------------------------------------

    [2006-09-27 16:57:56] [email]tony2001php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]

    Can't reproduce.

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/38976[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=38976&edit=1[/url]
    kae at verens dot com Guest

  6. #6

    Default #38976 [Com]: missing last character when fetching query

    ID: 38976
    Comment by: kae at verens dot com
    Reported By: zolfi at parspooyesh dot com
    Status: No Feedback
    Bug Type: PDO related
    Operating System: fedora linux 5
    PHP Version: 5.1.6
    New Comment:

    this bug appears to be fixed. I installed PHP 5.2 from the following
    repository, and the bug is gone:
    [url]http://remi.collet.free.fr/rpms/fc6.i386/[/url]


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-11-26 17:53:57] kae at verens dot com

    I have this error as well, and have been pulling my hair out for the
    last few days trying to figure out what was wrong with my code...

    FC6, php-5.1.6-3.1.fc6, php-pdo-5.1.6-3.1.fc6

    ------------------------------------------------------------------------

    [2006-11-06 17:49:06] jason at southerntextile dot com

    Latest Fedora RPMs (compilied Nov. 2) still affected by bug.

    ------------------------------------------------------------------------

    [2006-10-27 21:23:44] jason at southerntextile dot com

    Make that two differnt Fedora 6 servers with the same problem now (PHP
    5.1.6 /w PDO).

    ------------------------------------------------------------------------

    [2006-10-27 20:04:45] jason at southerntextile dot com

    Since doing a fresh install of Fedora 6. This is occuring on all my
    SQLite databases (using PDO).

    ------------------------------------------------------------------------

    [2006-10-05 01:00:00] php-bugs at lists dot php dot net

    No feedback was provided for this bug for over a week, so it is
    being suspended automatically. If you are able to provide the
    information that was originally requested, please do so and change
    the status of the bug back to "Open".

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/38976[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=38976&edit=1[/url]
    kae at verens dot com Guest

Similar Threads

  1. Replies: 0
    Last Post: September 27th, 04:57 PM
  2. #24753 [Opn]: missing character in POST data
    By robin at newloop dot com in forum PHP Development
    Replies: 0
    Last Post: July 23rd, 10:10 AM
  3. #24753 [Bgs->Opn]: missing character in POST data
    By robin at newloop dot com in forum PHP Development
    Replies: 0
    Last Post: July 22nd, 05:33 PM
  4. #24753 [Opn->Bgs]: missing character in POST data
    By derick@php.net in forum PHP Development
    Replies: 0
    Last Post: July 22nd, 05:24 PM
  5. Line drawing character missing?
    By Paladin in forum Debian
    Replies: 3
    Last Post: July 13th, 02:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139