ID: 35834 Updated by: [EMAIL PROTECTED] Reported By: alapidus1215 at gmail dot com -Status: Open +Status: Feedback Bug Type: PDO related Operating System: Windows XP Pro (with Apache2) PHP Version: 5.1.1 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2005-12-29 06:44:03] judas dot iscariote at gmail dot com try this: http://snaps.php.net/win32/php5.1-win32-latest.zip ------------------------------------------------------------------------ [2005-12-29 03:16:29] alapidus1215 at gmail dot com 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 this bug report at http://bugs.php.net/?id=35834&edit=1