php - Symfony3 : Login error : Authentication request could not be processed

标签 php mysql symfony

Symfony 版本:3.1.3

由于开发原因,我的应用程序突然出现以下错误,我相信可以使用如下错误日志检测到此错误。

登录错误:由于系统问题,无法处理身份验证请求。

/var/logs/dev.log 将其记录如下并希望消除此错误

[2016-09-02 12:40:05] request.INFO: Matched route "{route}". {"route":"fos_user_security_check","route_parameters":{"_controller":"FOS\\UserBundle\\Controller\\SecurityController::checkAction","_route":"fos_user_security_check"},"request_uri":"http://localhost/pie10-api/api/web/app_dev.php/login_check","method":"POST"} []

[2016-09-02 12:40:05] doctrine.DEBUG: SELECT t0.username AS username_1, t0.username_canonical AS username_canonical_2, t0.email AS email_3, t0.email_canonical AS email_canonical_4, t0.enabled AS enabled_5, t0.salt AS salt_6, t0.password AS password_7, t0.last_login AS last_login_8, t0.locked AS locked_9, t0.expired AS expired_10, t0.expires_at AS expires_at_11, t0.confirmation_token AS confirmation_token_12, t0.password_requested_at AS password_requested_at_13, t0.roles AS roles_14, t0.credentials_expired AS credentials_expired_15, t0.credentials_expire_at AS credentials_expire_at_16, t0.id AS id_17, t0.firstname AS firstname_18, t0.lastname AS lastname_19, t0.phoneNumber AS phoneNumber_20, t0.validationNumber AS validationNumber_21, t22.userId AS userId_23, t22.id AS id_24, t22.parentId AS parentId_25, t22.classId AS classId_26, t22.classId AS classId_27, t22.userId AS userId_28, t29.id AS id_30, t29.userId AS userId_31, t29.address AS address_32, t29.postCode AS postCode_33, t29.mobileNumber AS mobileNumber_34, t29.UserId AS UserId_35, t0.token AS token_36 FROM users t0 LEFT JOIN student t22 ON t22.userId = t0.id LEFT JOIN address t29 ON t29.UserId = t0.id WHERE t0.username_canonical = ? LIMIT 1 ["adminuser"] []

[2016-09-02 12:40:05] security.INFO: Authentication request failed. {"exception":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AuthenticationServiceException(code: 0): An exception occurred while executing 'SELECT t0.username AS username_1, t0.username_canonical AS username_canonical_2, t0.email AS email_3, t0.email_canonical AS email_canonical_4, t0.enabled AS enabled_5, t0.salt AS salt_6, t0.password AS password_7, t0.last_login AS last_login_8, t0.locked AS locked_9, t0.expired AS expired_10, t0.expires_at AS expires_at_11, t0.confirmation_token AS confirmation_token_12, t0.password_requested_at AS password_requested_at_13, t0.roles AS roles_14, t0.credentials_expired AS credentials_expired_15, t0.credentials_expire_at AS credentials_expire_at_16, t0.id AS id_17, t0.firstname AS firstname_18, t0.lastname AS lastname_19, t0.phoneNumber AS phoneNumber_20, t0.validationNumber AS validationNumber_21, t22.userId AS userId_23, t22.id AS id_24, t22.parentId AS parentId_25, t22.classId AS classId_26, t22.classId AS classId_27, t22.userId AS userId_28, t29.id AS id_30, t29.userId AS userId_31, t29.address AS address_32, t29.postCode AS postCode_33, t29.mobileNumber AS mobileNumber_34, t29.UserId AS UserId_35, t0.token AS token_36 FROM users t0 LEFT JOIN student t22 ON t22.userId = t0.id LEFT JOIN address t29 ON t29.UserId = t0.id WHERE t0.username_canonical = ? LIMIT 1' with params [\"adminuser\"]:\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table 'pie10.address' doesn't exist at /var/www/html/pie10-api/api/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/DaoAuthenticationProvider.php:94, Doctrine\\DBAL\\Exception\\TableNotFoundException(code: 0): An exception occurred while executing 'SELECT t0.username AS username_1, t0.username_canonical AS username_canonical_2, t0.email AS email_3, t0.email_canonical AS email_canonical_4, t0.enabled AS enabled_5, t0.salt AS salt_6, t0.password AS password_7, t0.last_login AS last_login_8, t0.locked AS locked_9, t0.expired AS expired_10, t0.expires_at AS expires_at_11, t0.confirmation_token AS confirmation_token_12, t0.password_requested_at AS password_requested_at_13, t0.roles AS roles_14, t0.credentials_expired AS credentials_expired_15, t0.credentials_expire_at AS credentials_expire_at_16, t0.id AS id_17, t0.firstname AS firstname_18, t0.lastname AS lastname_19, t0.phoneNumber AS phoneNumber_20, t0.validationNumber AS validationNumber_21, t22.userId AS userId_23, t22.id AS id_24, t22.parentId AS parentId_25, t22.classId AS classId_26, t22.classId AS classId_27, t22.userId AS userId_28, t29.id AS id_30, t29.userId AS userId_31, t29.address AS address_32, t29.postCode AS postCode_33, t29.mobileNumber AS mobileNumber_34, t29.UserId AS UserId_35, t0.token AS token_36 FROM users t0 LEFT JOIN student t22 ON t22.userId = t0.id LEFT JOIN address t29 ON t29.UserId = t0.id WHERE t0.username_canonical = ? LIMIT 1' with params [\"adminuser\"]:\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table 'pie10.address' doesn't exist at /var/www/html/pie10-api/api/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:53, Doctrine\\DBAL\\Driver\\PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pie10.address' doesn't exist at /var/www/html/pie10-api/api/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:93, PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pie10.address' doesn't exist at /var/www/html/pie10-api/api/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:91)"} []

[2016-09-02 12:40:05] security.DEBUG: Authentication failure, redirect triggered. {"failure_path":"fos_user_security_login"} []

[2016-09-02 12:40:05] request.INFO: Matched route "{route}". {"route":"fos_user_security_login","route_parameters":{"_controller":"FOS\\UserBundle\\Controller\\SecurityController::loginAction","_route":"fos_user_security_login"},"request_uri":"http://localhost/pie10-api/api/web/app_dev.php/login","method":"GET"} []

[2016-09-02 12:40:05] security.INFO: Populated the TokenStorage with an anonymous Token. [] []

[2016-09-02 12:40:05] request.INFO: Matched route "{route}". {"route":"_wdt","route_parameters":{"_controller":"web_profiler.controller.profiler:toolbarAction","token":"c2f5ea","_route":"_wdt"},"request_uri":"http://localhost/pie10-api/api/web/app_dev.php/_wdt/c2f5ea","method":"GET"} []

请让我知道是否需要任何其他开发或文件相关信息

最佳答案

在您提供的日志的第三行中有信息:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pie10.address' doesn't exist at /var/www/html/pie10-api/api/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:53, Doctrine\DBAL\Driver\PDOException(code: 42S02):

运行 Symfony 的命令:

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

更新您的数据库架构。

关于php - Symfony3 : Login error : Authentication request could not be processed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39286573/

相关文章:

symfony - 如何让所有用户使用FosUserBundle?

PHP : get file contents and store file in particular folder

php - 使用php分页显示10个项目

javascript - 无法生成使用js或php下载的文件

mysql - 迁移到 MongoDb?

symfony - "symfony new project-name"命令以 ISO-9958-1 编码生成文件

Symfony 3.2 检测到循环引用(配置限制 : 1)

php - 在 php 中生成缩略图,发布到 Azure 计算机视觉 API

Windows 上的 MySQL 连接过多 - 无法刷新主机

mysql - 使用 mysql 数据库上的访问信息连接到 MySQL 数据库