清除symfony2的缓存后,不允许身份验证 [英] Authentication not allowed after clearing cache of symfony2

查看:100
本文介绍了清除symfony2的缓存后,不允许身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很多次尝试后,我的symfony的缓存出现了问题(html页面中的更改未呈现),现在我无法通过该网站进行身份验证,这向我显示了此错误:

I had a problem with my symfony's cache (changes in html pages were not rendering ) after many Attempts now I can not authenticate to the web site ,it shows me this error :

执行'SELECT t0.username AS时发生异常 .........来自"fos_user"的t0位置 t0.username_canonical =?带有参数[[1999999]]的LIMIT 1': SQLSTATE [HY000]:常规错误:1没有这样的表:fos_user

An exception occurred while executing 'SELECT t0.username AS ......... FROM "fos_user" t0 WHERE t0.username_canonical = ? LIMIT 1' with params ["1999999"]: SQLSTATE[HY000]: General error: 1 no such table: fos_user

在我的fos/userbundle/entity/User.php中,我有以下参数:

in my fos/userbundle/entity/User.php I have these parameters :

namespace FOS\UserBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
 * User
 *
 * @ORM\Table(name="`fos_user`")
 * @ORM\MappedSuperClass
 */
class User
{
.............

在我的Bse/mybundle/entity/User.php中,我具有以下参数:

and in my Bse/mybundle/entity/User.php I have these parameters :

namespace FOS\UserBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * User
 *
 * @ORM\Table(name="`fos_user`")
 * @ORM\MappedSuperClass
 */
class User
{.....

数据库中的表称为 fos_user

我在我的app.php中使用$kernel = new AppKernel('prod',false);,在我的app_dev.php中使用$kernel = new AppKernel('dev', true);

I'm using $kernel = new AppKernel('prod',false);in my app.php and $kernel = new AppKernel('dev', true); in my app_dev.php

我正在寻求您的帮助

推荐答案

您没有表fos_user,这就是问题所在.

You've got no table fos_user, which is the problem.

您可以尝试:

php bin/console doctrine:schema:update --force

看看是否能解决问题.我认为您以某种方式进行了大更改并删除了表格?如果上述方法无效,请编辑您的信息并显示文件app/config/parameters.yml.

See if that does the trick. I'm thinking you made a big change somehow and deleted the table? If the above doesn't work, edit your post and show the file app/config/parameters.yml please.

这篇关于清除symfony2的缓存后,不允许身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆