I\'am using Symfony for a project and I have been trying to get the login to work on production server with no success for the past 2 days. I keep getting the error
This solution is correct for me: https://stackoverflow.com/a/39782535/2400373
But If you do not have access to the terminal, you can enter the server and delete the folders that are inside var/cache.
Another solution if you have access to the console is to type
#rm -rf var/cache/*
or
$sudo rm -rf var/cache/*
this solution works on symfony 3
In my case, I changed user entity and then I forgot to update table.
for table update:
php bin/console doctrine:schema:update --force
AS @ShinDarth mention it. It is too generic and log inspection will help people in our case to get throught this.
If it can help in my situation it was :
After an SonataUserBundle installation in SF3, I had to
bin/console doctrine:schema:update --force
My context is particular, I have had already installed and used FOSUserBundle before to install SonataUserBundle. (Because of SF3 compatibility with FOSUser/SonataUSer... Database have been taken 16 queries after that. Working great.
Another possible cause could be MySQL Server. In my case I forgot to start MAMP / MySQL Server and Symfony resulted with this message.
UPDATE: Issue solved. The issue was that a table in the entity php file was named with upper case letters while the database table was named with lower case. +1 to ClémentBERTILLON for pointing in the right direction, namely prod.log
In my case the issue was fixed by correcting a typo in connection details in the .env file.