#35834 [NEW]: Numeric value out of range: unhandled mode
From: alapidus1215 at gmail dot com
Operating system: Windows XP Pro (with Apache2)
PHP version: 5.1.1
PHP Bug Type: PDO related
Bug description: Numeric value out of range: unhandled mode
Description:
------------
I get an error on one of my well-formed queries in attempting to convert
from MySQLi to PDO (MySQL). (The possible queries are listed in the
reproduced code.)
Error logged by Apache2:
[Wed Dec 28 20:00:24 2005] [error] [client 64.252.4.72] PHP Warning:
PDO::query() [<a href='function.query'>function.query</a>]:
SQLSTATE[22003]: Numeric value out of range: unhandled mode; this is a PDO
bug, please report it in C:\\Program Files\\Apache
Group\\Apache2\\htdocs\\new\\classes\\Database2.class.php on line 31
Reproduce code:
---------------
This is my old Database class, which works fine with my queries:
http://alapidus.ath.cx/new/classes/Database.class.phps
This is my attempt at converting it to PDO:
http://alapidus.ath.cx/new/classes/Database2.class.phps
I pass these arguments to my new class's constructor:
'mysql', 'localhost', 'alapidus', 'my_password',
'website', '0'
The queries which might cause the error:
SELECT users.id, level, password, signature, quote, public_email, im_type,
im_address, karma, theme, COUNT(messages.id) AS active_messages FROM users
JOIN messages ON poster_id = users.id WHERE username = 'alapidus' GROUP BY
users.id LIMIT 1
SELECT * FROM user_prefs WHERE user = 1
UPDATE users SET last_page = '/new/index.php?queries', last_time =
'1135818962', last_ip = '64.252.4.72', browser = 'Mozilla/5.0 (Windows; U;
Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5' WHERE id = 1
SELECT filename FROM stylesheets WHERE id = 2 LIMIT 1
I regret that I cannot confirm which one is actually causing the error.
Expected result:
----------------
A fetchable result-set from my MySQL query.
Actual result:
--------------
Error logged by Apache2:
[Wed Dec 28 20:00:24 2005] [error] [client 64.252.4.72] PHP Warning:
PDO::query() [<a href='function.query'>function.query</a>]:
SQLSTATE[22003]: Numeric value out of range: unhandled mode; this is a PDO
bug, please report it in C:\\Program Files\\Apache
Group\\Apache2\\htdocs\\new\\classes\\Database2.class.php on line 31
--
Edit bug report at http://bugs.php.net/?id=35834&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35834&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35834&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35834&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35834&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35834&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35834&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35834&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35834&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35834&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35834&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35834&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35834&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35834&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35834&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35834&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35834&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35834&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35834&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35834&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35834&r=mysqlcfg
Thread (3 messages)
- alapidus1215 at gmail dot com