Mike
Mike

Reputation: 2923

How to configure enable php_pdo_mysql on php5.5.12 and Apache 2.4

After uninstalled IIS from the server, I installed Apache 2.4 64-bit on Windows Server 2008 R2. Additionally, I installed PHP 5.5.12 64-bit.

I followed the instructions on this this "How install Apache 2.4 and PHP"

Everything seems to be fine. But What I am having difficulty with is enabling the php_pdo_mysql. I uncommented both lines in the php.ini file located on c:/php/php.ini

extension=php_mysql.dll
extension=php_mysqli.dll

Then I rebooted the Apache server "for the services list" but the pdo_mysql extension is not loading it as it should.

here are some snapshots from my php info enter image description here enter image description here enter image description here enter image description here enter image description here More, this is the output on the shell>php -m

enter image description here

here are the files from my server enter image description here enter image description here

What else do I need to do to enable pdo_mysql? What else can I check for?

Thank you

Upvotes: 0

Views: 6720

Answers (2)

Mike
Mike

Reputation: 2923

I figure out the problem.

I need to add the following to windows environment variables

;c:\php;c:\apache24;c:\apache24\bin;

After that rebooted Apache and it worked with no issues.

Upvotes: 2

Ulrich Thomas Gabor
Ulrich Thomas Gabor

Reputation: 6654

You must load the PDO dll, not the default mysql extensions.

Add the following two lines to your configuration:

extension=php_pdo.dll
extension=php_pdo_mysql.dll

These lines load the PDO extensions. Your lines load the MySQL and MySQLi extension.

Upvotes: 1

Related Questions