Search code examples
phpmysqlcakephppropelcakephp-bake

reverse database won't work from terminal (PROPEL / BAKE CAKEPHP)


I've been trying to generate model classes from a local database using both propel and bake for cakephp , it seems that i have the same problem :

When I try to acces the database through bake or propel it gives me an error that it can't open the connection:

So I tried this : I try to acces the database from the application using pdo it works just fine!!! When I tried to acces database through terminal it's also working !!!

I really don't know what's the problem here !


Solution

  • You most likely have a separate php.ini config file for CLI and pdo_mysql is not loaded for CLI.