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?

1

2 Answers 2

14

you have to install the library first.

yum install php-mysql 
1
  • "No package php-mysql available." here Oct 1, 2017 at 1:20
-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 :)

3
  • This is illegible. I can't tell how to format it properly, else I'd edit it. Please use code blocks for configuration files and console input/output so that there's a visual organization to the text in the answer. See Formatting Help
    – austinian
    Aug 21, 2015 at 5:29
  • Hi, I'm new in here and just wanna try to help the other has the same problem with Re-Index Magento on Centos 6.3, PHP 5.4.8, Nginx. So, pls do not vote down if you do not have the same problem and do not understand. Thanks. Aug 23, 2015 at 2:44
  • This is a similar error to a different question. The question at hand is how to resolve the failure to load the pdo_mysql dll when extension=pdo_mysql.so is included in the php.ini file, not when you get the error 'The PDO extension is required for this adapter but the extension is not loaded'. Please keep answers on topic, and if you have the answer to a different question that hasn't been asked, please ask and then answer another question. You can feel free to link to this question as a related question, but it is not the same question.
    – austinian
    Aug 23, 2015 at 3:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .