Symfony3:登录错误:无法处理身份验证请求

时间:2016-09-02 07:23:34

标签: 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"} []

请告诉我需要任何其他开发或文件相关信息

1 个答案:

答案 0 :(得分:2)

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

  

SQLSTATE [42S02]:未找到基表或视图:1146表'pie10.address'不存在在/ var / www / html / pie10-api / api / vendor / doctrine /dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:53,Doctrine \ DBAL \ Driver \ PDOException(代码:42S02):

运行Symfony的命令:

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

更新数据库架构。

相关问题