Doctrine : Couldn’t locate driver named Mysql

November 2, 2010 § Leave a comment

From the beginning, I would think this is because of the coding of Doctrine is having some issues. Googled it, people said enable the PDO will solve the matter, which I did as it clearly stated on the phpinfo.

What else went wrong?
Then I dig the code of Doctrine, I found out if it didnt find the PDO module, it will find a class called MYSQL_Driver , something like that, but that class is never exist.

Testing

I created a PDO connection testing script, and tested it in browsers, worked!

But when I use Terminal to test it, it complained, so that mean the Terminal couldn’t find the extensions path.

Solution

It is the PATH variable need to be config in order to run the CLI method which documented by the Doctrine Official site.

In order to config the PATH variable, you may want to follow Keito.me . Although it stated clearly for XAMPP, but the setting PATH Method is also work for any kind of localhost app (e.t.c MAMPP). The site provide method for both Windows and Mac.

Advertisements

Tagged: , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading Doctrine : Couldn’t locate driver named Mysql at Nick Wan L.K..

meta

%d bloggers like this: