7

I have a new CentOS 6 server running PHP 5.3.2. The output of php -v shows

Unable to load dynamic library '/usr/lib64/php/modules/pdo_mysql.so - 
/usr/lib64/php/modules/pdo_mysql.so cannot open shared object file

I modified /etc/php.ini to include extension=pdo.so and extension=pdo_mysql.so and restarted httpd. I did install PDO and phpinfo.php shows pdo_sqllite installed?? How do I install pdo_mysql and rectify above warning message?

SidC
  • 369

2 Answers2

14

you have to install the library first.

yum install php-mysql 
quanta
  • 52,423
heiko
  • 156
  • 1
  • 2
-2

My server Centos 6.3, PHP 5.4.8, Nginx.


I try to reindex my Magento website:

php -f indexer.php reindexall

And get error:

'The PDO extension is required for this adapter but the extension is not loaded'

Then I run:

pecl install pdo

yum install php-mysql

then, restart server

service nginx restart

Try to reindex Magento:

php -f indexer.php reindexall

It works :)