gpt4 book ai didi

mysql - 即使 SQL 查询找到行,Cakephp Auth 登录也会返回 false

转载 作者:行者123 更新时间:2023-11-30 23:26:09 26 4
gpt4 key购买 nike

我在 linux 机器上安装了 Cakephp 应用程序。安装了 Mysql 驱动程序并删除了 php-pecl-acl。Cookie 没有问题。用户和密码存在于数据库中。密码是数据库中的 CHAR(40)。

Auth->login() 方法总是返回 false,即使 sql 查询调试日志显示受影响的行数 = 1

array(
'log' => array(
(int) 0 => array(
'query' => 'SELECT `User`.`id`, `User`.`username`, `User`.`password`, `User`.`email`, FROM `somedatabase`.`users` AS `User` WHERE `User`.`username` = 'someuser' AND `User`.`password` = '2d7a34c9ef8efa2cfdf4b89175f7edec1cd0ddda' LIMIT 1',
'params' => array(),
'affected' => (int) 1,
'numRows' => (int) 1,
'took' => (float) 2
)
),
'count' => (int) 1,
'time' => (float) 2

请帮忙。谢谢。

最佳答案

听起来像我遇到的完全相同的问题,最终成为与 PDO/PECL 相关的特定于服务器的问题:

$this->Auth->login() creates correct query that returns 1 row, but fails IF check (server specific issue)


编辑:OP 关于他如何修复的评论:

I uninstalled PECL, then uninstalled php-pdo and put back the original php.ini file. After that I reinstalled mysql-php and php-pdo packages from Amazon and it worked. You were correct it was server issue with the pdo installation.

关于mysql - 即使 SQL 查询找到行,Cakephp Auth 登录也会返回 false,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13237165/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com