PDO 报错 DibiDriverException: SQLSTATE[HY000]:
程序员文章站
2022-05-25 15:20:26
...
数据库配置页
"SET NAMES utf8"
));
dibi::connect(array(
'driver' => 'pdo',
'pdo' => $dsn,
'lazy' => true,
'profiler' => array(
'run' => TRUE,
),
));
$dibi = true;
} catch (Exception $e) {
echo $e->getMessage();
exit();
}
?>
报错
http://up.vpsbar.im/tmp/exception-2014-04-22-04-24-23-f770dde7183df6636b625fac44d0ec02.html
日志
[2014-04-22 04-05-50] DibiDriverException: SQLSTATE[HY000]: Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in /web/lib/dibi.min.php:1102 @ http://up.vpsbar.im/en/public @@ exception-2014-04-22-04-05-50-f3cf5137b37058de5d269f6efb15af27.html
[2014-04-22 04-05-59] DibiDriverException: SQLSTATE[HY000]: Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in /web/lib/dibi.min.php:1102 @ http://up.vpsbar.im/en/public @@ exception-2014-04-22-04-05-50-f3cf5137b37058de5d269f6efb15af27.html
[2014-04-22 04-06-10] DibiDriverException: SQLSTATE[HY000]: Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in /web/lib/dibi.min.php:1102 @ http://up.vpsbar.im/en/public @@ exception-2014-04-22-04-05-50-f3cf5137b37058de5d269f6efb15af27.html
[2014-04-22 04-06-19] DibiDriverException: SQLSTATE[HY000]: Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in /web/lib/dibi.min.php:1102 @ http://up.vpsbar.im/en/public @@ exception-2014-04-22-04-05-50-f3cf5137b37058de5d269f6efb15af27.html
[2014-04-22 04-07-25] DibiDriverException: SQLSTATE[HY000]: Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in /web/lib/dibi.min.php:1102 @ http://up.vpsbar.im/en/public @@ exception-2014-04-22-04-05-50-f3cf5137b37058de5d269f6efb15af27.html
回复内容:
数据库配置页
"SET NAMES utf8"
));
dibi::connect(array(
'driver' => 'pdo',
'pdo' => $dsn,
'lazy' => true,
'profiler' => array(
'run' => TRUE,
),
));
$dibi = true;
} catch (Exception $e) {
echo $e->getMessage();
exit();
}
?>
报错
http://up.vpsbar.im/tmp/exception-2014-04-22-04-24-23-f770dde7183df6636b625fac44d0ec02.html
日志
[2014-04-22 04-05-50] DibiDriverException: SQLSTATE[HY000]: Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in /web/lib/dibi.min.php:1102 @ http://up.vpsbar.im/en/public @@ exception-2014-04-22-04-05-50-f3cf5137b37058de5d269f6efb15af27.html
[2014-04-22 04-05-59] DibiDriverException: SQLSTATE[HY000]: Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in /web/lib/dibi.min.php:1102 @ http://up.vpsbar.im/en/public @@ exception-2014-04-22-04-05-50-f3cf5137b37058de5d269f6efb15af27.html
[2014-04-22 04-06-10] DibiDriverException: SQLSTATE[HY000]: Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in /web/lib/dibi.min.php:1102 @ http://up.vpsbar.im/en/public @@ exception-2014-04-22-04-05-50-f3cf5137b37058de5d269f6efb15af27.html
[2014-04-22 04-06-19] DibiDriverException: SQLSTATE[HY000]: Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in /web/lib/dibi.min.php:1102 @ http://up.vpsbar.im/en/public @@ exception-2014-04-22-04-05-50-f3cf5137b37058de5d269f6efb15af27.html
[2014-04-22 04-07-25] DibiDriverException: SQLSTATE[HY000]: Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in /web/lib/dibi.min.php:1102 @ http://up.vpsbar.im/en/public @@ exception-2014-04-22-04-05-50-f3cf5137b37058de5d269f6efb15af27.html
using PDOStatement::fetchAll()
setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in /web/lib/dibi.min.php:1102
上述两者选其一。。。。。看日志。。。。
推荐阅读
-
php使用pdo连接报错Connection failed SQLSTATE的解决方法
-
php使用pdo连接报错Connection failed SQLSTATE的解决方法_PHP
-
php使用pdo连接报错Connection failed SQLSTATE的解决方法_PHP
-
PDO 报错 DibiDriverException: SQLSTATE[HY000]:
-
php pdo连接报错Connection failed: SQLSTATE[HY000] [2002]
-
php使用pdo连接报错Connection failed SQLSTATE的解决方法
-
PDO 报错 DibiDriverException: SQLSTATE[HY000]:
-
php使用pdo连接报错Connection failed SQLSTATE的解决方法,pdosqlstate_PHP教程
-
YIi PDO CDbConnection 无法开启数据库连线: SQLSTATE[HY000] [2002]
-
YIi PDO CDbConnection 无法开启数据库连线: SQLSTATE[HY000] [2002]