开发者

symfony doctrine:insert-sql - "Couldn't locate driver named mysql" error

开发者 https://www.devze.com 2022-12-28 16:00 出处:网络
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

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 pr开发者_StackOverflowesent in C:\wamp\www\jobeet Kindly help me resolve this, as I am stuck here, and cant move further.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号