Question

hey, I am a newbie in symfony. I am following this joobet tutorial on symfony-project.com, I am on there day 3 http://www.symfony-project.org/jobeet/1_4/Doctrine/en/03 Whenever I type php symfony doctrine:insert-sql, I get the following error:

doctrine creating tables Couldn't locate driver named mysql

I am using it on WAMP. I have symfony present at C:\wamp\bin\php\php5.3.0\PEAR\symfony and my project is present in C:\wamp\www\jobeet Kindly help me resolve this, as I am stuck here, and cant move further.

Was it helpful?

Solution

You need to enable the mysql driver of PDO. You will need to edit 1 or 2 php.ini files, depending on your system.

First you need to edit the php.ini apache uses, you can find it by creating a new file that does a phpinfo(), checking it via a browser and searching for "php.ini".

The second one is the one the command line uses, open a terminal (start - run - cmd.exe), and run php -i > phpinfo.txt, then open the text file and search for "php.ini".

You are looking for the extensions part of it, uncomment the line with pdo_mysql (remove the ; at the beginning). After all these, restart apache and you're good to go.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top