Symfony2 / Doctrine "app/console doctrine:schema:update --force" brings a ContextErrorException Symfony2 / Doctrine "app/console doctrine:schema:update --force" brings a ContextErrorException symfony symfony

Symfony2 / Doctrine "app/console doctrine:schema:update --force" brings a ContextErrorException


I had this issue before, for me it was about different environments. You probably run your app in dev environment, and the doctrine command target the prod one.

First, try to run those commands to see if it's the cause :

app/console doctrine:schema:update --force --env devapp/console doctrine:schema:update --force --env prod

Then you should try a phpinfo() after switching environment and see if others *.ini files are loaded


You should also edit the php.ini file under /etc/php. /etc/php5/apache2/php.ini, this configuration is for apache