php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48158 Undefined class constant 'FETCH_KEY_PAIR'
Submitted: 2009-05-06 03:07 UTC Modified: 2009-05-18 01:00 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: d dot snytkine at gmail dot com Assigned:
Status: No Feedback Package: PDO related
PHP Version: 5.2.9 OS: RHEL 5
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: d dot snytkine at gmail dot com
New email:
PHP Version: OS:

 

 [2009-05-06 03:07 UTC] d dot snytkine at gmail dot com
Description:
------------
Even though the documentation states that this constant is available as of php 5.2.3, In PHP 5.2.9, attempts to use PDO::FETCH_KEY_PAIR result in
PHP Fatal error:  Undefined class constant 'FETCH_KEY_PAIR' 




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-06 11:01 UTC] felipe@php.net
I can't reproduce it. Please, check the PHP version again.
 [2009-05-06 12:49 UTC] s dot snytkine at gmail dot com
The is some info from my phpinfo:
php version 5.2.9

was build with these config options:
'--enable-pdo=shared' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-sqlite=shared' 

Further down in phpinfo:
PDO drivers 	mysql 

and then:
pdo_mysql
PDO Driver for MySQL, client library version	5.0.45


Then in php.ini I have:
extension="rar.so"
extension="memcache.so"
extension="memcached.so"
extension="pdo.so"
extension="pdo_mysql.so"
extension="mailparse.so"
extension="uploadprogress.so"
 [2009-05-06 13:26 UTC] d dot snytkine at gmail dot com
I have just rebuild my php this time making pdo and pdo_mysql static instead of shared and if fixed the problem

I guess that there really must be a bug when pdo and pdo_mysql are built as shared modules
because even some other constants were not available when pdo was a shared module.

There 2 were not available also:
PDO::ATTR_DEFAULT_FETCH_MODE

PDO::FETCH_PROPS_LATE

even though there we supposed to be available since php 5.2.0 there were not available on php 5.2.9 when pdo was built as shared module
 [2009-05-10 13:42 UTC] iliaa@php.net
Is the PDO module loaded?
 [2009-05-18 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: Mon Oct 06 07:00:02 2025 UTC