tags:

views:

16

answers:

1

Hi, I'm trying to learn the Symfony framework for PHP but having issues with the command line version of php.

When trying to create the database tables:

./symfony doctrine:insert-sql

I'm getting the following error:

Couldn't locate driver named mysql

This is only an issue with the command line version of php. I've had doctrine working no problem.

After quickly reading up on the problem, it seems I need to enable PDO_MYSQL for the CLI installation of php. I've looked in the php.ini file and there does not appear to be a relevant entry for it.

Is there any easy way to make the CLI version use exactly the same configuration of my LAMPP configuration, in order to minimise complications in the future?

Any advice would be greatly appreciated.

Thanks.

A: 

check the php.ini in your apache folder and copy the PDO information to the php.ini in your php folder.

In my lampp configuration I just have 'extension=pdo.so' in php.ini

douwe