Abubakkar Rangara Abubakkar Rangara - 1 year ago 148
SQL Question

Php pdo mysql not found

I have already done much digging on installing/enabling PDO mysql extension on stackoverflow and many other sites, so please do not consider this as a duplicate question

I am on centos 6.5 and has php 5.5.26 which was compiled with

make, make install
(I know this is an older version so please do not close question or suggest updating to new php version. Also cannot install php using yum as this is what has been installed already me and should not be installed/changed).

So when I did compile php and added it to apache, it does not show mysql PDO driver. I tried putting
file with no success (yes I did restart the server as well, after making changes).

It shows pdo enabled, but only for drivers pgsql and sqlite.

Also, tried installing php-mysql package using yum. But the issue with yum installation is it installs 5.3.3 version of driver which complains about compatibility issues as my php version is 5.5.26.

So I am not sure what I need to do install pdo mysql extension

Answer Source

@Peter Darmis was right from his comments.

PHP 5.3.3 was not completely uninstalled, don't know why.

There was already a PHP installed manually be compilation and, as I wasn't aware about this, I was using yum for installation of modules and at that time PHP 5.3.3 got installed which I don't know why it dot un-install properly.

So I ended up with 2 PHP versions, so uninstalled PHP 5.3.3 completely using yum and then resolved this issue compiling PHP with pdo options

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download