php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35834 Numeric value out of range: unhandled mode
Submitted: 2005-12-29 03:16 UTC Modified: 2006-01-06 01:00 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: alapidus1215 at gmail dot com Assigned:
Status: No Feedback Package: PDO related
PHP Version: 5.1.1 OS: Windows XP Pro (with Apache2)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: alapidus1215 at gmail dot com
New email:
PHP Version: OS:

 

 [2005-12-29 03:16 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-29 10:07 UTC] sniper@php.net
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


 [2006-01-06 01:00 UTC] 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".
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 21:01:27 2025 UTC