Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As per the title I'm having problems with PHP 5.2.10 and getting PDO MySQL to be recognised.

My configure command contains '--enable-pdo=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,/usr' '--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr'

and the file is available in the folder indicated by extension_dir variable, I've added

to php.ini and there are ini files in the php.d folder for the pdo drivers, but still phpinfo reports the PDO support is enabled but the drivers value is set to no value.

I'm on Centos with Nginx, PHP 5.2.10

I'm kinda stuck, your help would be appreciated

share|improve this question

migrated from Jul 12 '11 at 15:58

This question came from our site for professional and enthusiast programmers.

is php-pdo installed? – ArtoAle Jun 15 '11 at 12:11
Where is the PHP binary from? From your systems package manager? – hakre Jun 15 '11 at 12:14
Ah, just done a pecl install pdo_mysql and got... checking for mysql_query in -lmysqlclient... no configure: error: mysql_query missing!? – creativenode Jun 15 '11 at 12:27
@hakre not sure where it's from. doing yum list installed | grep pdo returns php-pdo.i386 5.2.10-1.el5.centos installed – creativenode Jun 15 '11 at 12:40
yum is the package manager. can you tell for the PHP itself as well? – hakre Jun 15 '11 at 12:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.