全球主机交流论坛

标题: 问个问题 PDO 老报错。。肿么回事啊!重金悬赏! [打印本页]

作者: vpsbar    时间: 2014-4-22 14:55
标题: 问个问题 PDO 老报错。。肿么回事啊!重金悬赏!
数据库配置页
  1. db.<?php
  2. require './lib/dibi.min.php';

  3. // DB
  4. try {
  5.         $dsn = new PDO("mysql:host=localhost;dbname=runtime", 'root', '****', array(
  6.                 PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"
  7.         ));

  8.         dibi::connect(array(
  9.                 'driver' => 'pdo',
  10.                 'pdo' => $dsn,
  11.                 'lazy' => true,
  12.                 'profiler' => array(
  13.                 'run' => TRUE,
  14.             ),
  15.         ));

  16.         $dibi = true;

  17. } catch (Exception $e) {
  18.         echo $e->getMessage();
  19.         exit();
  20. }

  21. ?>
复制代码


报错
http://up.vpsbar.im/tmp/exceptio ... 625fac44d0ec02.html

日志
  1. [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
  2. [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
  3. [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
  4. [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
  5. [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
复制代码


求大神帮助! 散尽我的积分
作者: psdshow    时间: 2014-4-22 16:29
给你谷歌翻译了一下
另外,如果你的代码是唯一永远要对mysql数据库方式运行,你可以通过设置PDO:: MYSQL_ATTR_USE_BUFFERED_QUERY属性启用查询缓存。
in /web/lib/dibi.min.php:1102




欢迎光临 全球主机交流论坛 (https://d.168530.xyz/) Powered by Discuz! X3.4