All posts tagged Symfony2

Cannot connect to MySQL when running Symfony2 commands

If you get the following error when running a Symfony command through the command line (like doctrine:schema:update): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ Try configuring app/config/parameters.yml with the server hostname where your account resides (ie. sg112.servergrove.com) instead of localhost. This will force the ORM to connect through . . . Read more

How do I schedule Symfony2 commands on shared hosting?

The cron task runs in a different environment that the shell access does, and this might provoke an error related to the project paths. This is why you have to set the full path for the Symfony2 console script, just as the cron sees it. php /var/www/vhosts/example.com/symfony_projects/myProject/app/console my:command Related Articles . . . Read more