From:             mike at blueroot dot co dot uk
Operating system: Linux 2.6
PHP version:      5.1.0RC1
PHP Bug Type:     PDO related
Bug description:  PDO returns corrupted data

Description:
------------
PDO is corrupting data returned from the database.

Numbers such as 15215 are returned as 1521[random character]

eg. 11511 is returned as 1151

This bug doesnt seem to be present in php-5.1.0b2 (php-5.1.0b3 has a
mktime bug), but it is in RC1

Reproduce code:
---------------
$sql = "SELECT id FROM table WHERE other_id = 3";
$rs = $db->query($sql);
$result = $rs->fetchAll(PDO_FETCH_ASSOC);

print_r($result);



Expected result:
----------------
Array
(
    [id] => 11511
)



Actual result:
--------------
Array
(
    [id] => 1151
)



-- 
Edit bug report at http://bugs.php.net/?id=34332&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34332&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34332&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34332&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34332&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34332&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34332&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34332&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34332&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34332&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34332&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=34332&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=34332&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34332&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34332&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34332&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34332&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34332&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34332&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34332&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34332&r=mysqlcfg

Reply via email to