Php – Compile pdo and pdo_thesql for PHP

pdoPHP

I am trying to compile pdo.so and pdo_mysql.so to get pdo support on my PHP5 install.
I tried the following :

./configure --prefix=/thedirectory --with-mysql --with-pdo-mysql --enable-pdo

Compilation is successful but the .so aren't generated.
I am supposed to have/specify a mysql installation?

Is the pdo support supposed to be compiled within php core ?
If I run a php -m I can see PDO and pdo_mysql registered, but a phpinfo() states no pdo_mysql support.
I guess the php -m just tells me php has pdo support but still need the .so?

Could anyone advise?

Thanks

Best Answer

Use the following configure options:

./configure \
--with-mysqli=/home/user/programs/mysql/install/bin/mysql_config \
--with-pdo-mysql=/home/user/programs/mysql/install

The /home/user/programs/mysql/install directory is where MySQL has been installed.

You should see a pdo_mysql section in the phpinfo() output showing the following:

PDO Driver for MySQL    enabled
Client API version  5.7.16