【问题标题】:Laravel WRONG_STMT_PREPARE response sizeLaravel WRONG_STMT_PREPARE 响应大小
【发布时间】:2017-06-18 01:59:25
【问题描述】:

我在同一个共享主机上有两个网站,名为 ecommercetorricelli 和 progettost,使用相同的用户名。

当我尝试登录 ecommercetorricelli 时,在更改 config/database.php 文件中的数据库设置后出现以下错误:

“Connection.php 第 647 行中的 QueryException: 错误 COM_STMT_PREPARE 响应大小。收到 7 (SQL: select * from utenti where email = test@test.com 限制 1)"

检查其他网站progettost后,即使我没有做任何更改,它也给出了同样的错误。

【问题讨论】:

  • 你清除缓存了吗?
  • 清除缓存后也更新作曲家一次

标签: php laravel hosting


【解决方案1】:

我已经通过更改 PDO 驱动程序设置解决了这个问题

config/database.php

试试这个。

    'mysql' => [
    'driver' => 'mysql',
/*****
rest of the constrain remain same
****/
    'options'   => [PDO::ATTR_EMULATE_PREPARES => true,]
],

【讨论】:

    猜你喜欢
    • 2012-04-08
    • 2012-05-15
    • 2017-10-11
    • 1970-01-01
    • 1970-01-01
    • 2020-12-21
    • 2017-10-12
    • 2020-12-29
    • 2015-09-06
    相关资源
    最近更新 更多