Can't get PDO MySQL driver to work on PHP

Posted by bart on Server Fault See other posts from Server Fault or by bart
Published on 2011-01-13T20:24:05Z Indexed on 2012/04/09 23:35 UTC
Read the original article Hit count: 300

Filed under:
|
|
|

Trying to install Vanilla 2 locally using MAMP i got the error: "You must have the MySQL driver for PDO enabled in order for Vanilla to connect to your database".

When I check phpinfo() I see:

--with-pdo-mysql=shared,/Applications/MAMP/Library
--with-pdo-pgsql=shared,/Applications/MAMP/Library/pg

When I go and check out those paths I find the files:

libpq.5.dylib
libpq.dylib
libpq.5.2.dylib

When I check my php.ini file I see:

; Extensions
extension=pdo_mysql.so

In php.ini the path to the extension dir is correct (checked it manually):

extension_dir = "/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/"

In this folder I find the file:

pdo_mysql.so

phpinfo() gives me two sections:

PDO
PDO drivers: sqlite, sqlite2

and

pdo_sqlite
SQLite Library: 3.6.22 

So everything seems to be fine, but can't get the PDO MySQL driver working :(

© Server Fault or respective owner

Related posts about mysql

Related posts about php