Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable PDO for PHP5 on CentOS5 where PHP is configured as '--disable-pdo'

Tags:

php

pdo

I have been given access to a CentOS5 machine by my client for their new site which uses Zend Framework.

phpinfo() states in Configure Command that PDO is disabled ('--disable-pdo'). How can enable it? Do I need to recompile PHP5 to enable it?

I have tried adding 'extension=pdo.so' in php.ini and restarting Apache, but this didn't work.

It would also be nice to understand what '--disable-pdo' actaully means, does it mean it's not compiled into PHP or does it mean its just not enabled?

like image 377
Jake N Avatar asked Mar 22 '10 22:03

Jake N


1 Answers

Not compiled. Install it from your distro's repositories, eg. yum install php-pdo.

like image 158
jholster Avatar answered Oct 01 '22 05:10

jholster