views:

1250

answers:

1

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.

+1  A: 

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.

Maerlyn
Thanks for the help. When I run, check_configuration.pph, it gives me following: OK PDO is installed[[WARNING]] PDO has some drivers installed: : FAILED *** Install PDO drivers (mandatory for Propel and Doctrine) ***What shall I do now?
Blessed
where as in phpinfo() it says:PDOPDO support enabledPDO drivers mysql, sqlitepdo_mysqlPDO Driver for MySQL enabledClient API version mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $Persistent cache enabledput_hits 0put_misses 0get_hits 0get_misses 0size 2000free_items 2000references 2Directive Local Value Master Valuepdo_mysql.cache_size 2000 2000
Blessed
Keep in mind that apache and the command line possibly use different php.ini files. You need to edit the one the CLI uses, I described above how to find it.
Maerlyn