5

我已经启用了视图模块并在我进入 drupal 7 中的结构>视图时得到了这个

处理异常时抛出额外的未捕获异常。原来的

PDOException:SQLSTATE [HY000]:一般错误:2006 MySQL 服务器已消失:DELETE FROM {cache_form} WHERE (cid = :db_condition_placeholder_0) ;cache_clear_all() 中的数组( [:db_condition_placeholder_0] => form_form-MKcd7j8VJkLHaG7-JGW-vREo_XeUngdnLcqlKOn-02o )(/home/tennis/public_html/includes/cache.inc 的第 170 行)。额外的

PDOException:SQLSTATE [HY000]:一般错误:2006 MySQL 服务器已消失:INSERT INTO {watchdog}(uid、类型、消息、变量、严重性、链接、位置、引用者、主机名、时间戳)值(:db_insert_placeholder_0、:db_insert_placeholder_1 , :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); 数组 ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => php [:db_insert_placeholder_2] => %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{ s:5:"%type";s:12:"PDOException";s:8:"!message";s:240:"SQLSTATE[HY000]: 一般错误:2006 MySQL 服务器已消失:DELETE FROM {cache_form } WHERE (cid = : db_condition_placeholder_0) ; 数组 ([:db_condition_placeholder_0] => form_form-MKcd7j8VJkLHaG7-JGW-vREo_XeUngdnLcqlKOn-02o ) ";s:9:"%function";s:17:"cache_clear_all()";s:5:"%file";s :43:"/home/tennis/public_html/includes/cache.inc";s:5:"%line";i:170;s:14:"severity_level";i:3;} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] =>http://192.168.1.66/~tennis/admin/structure/views [:db_insert_placeholder_7] => http://192.168.1.66/~tennis/user/1 [:db_insert_placeholder_8] => 192.168.1.172 [:db_insert_placeholder_9] = > 1309366098 ) 在 dblog_watchdog() 中(/home/tennis/public_html/modules/dblog/dblog.module 的第 155 行)。

也许我的问题是什么?

4

1 回答 1

7

以下是有关该错误的一些信息:http: //dev.mysql.com/doc/refman/5.1/en/gone-away.html和 Drupal.org 上的类似问题:http: //drupal.org/node/ 984112

关于这个错误的另一个有用的帖子:http: //madhavvyas.blogspot.com/

似乎问题出max_allowed_packet在 MySQL 的配置上。

从 Drupal 问题中,另一个用户提供了一些可以帮助您的步骤(这个用户正在使用 XAMPP,但步骤类似):

如何解决此问题

  • 转到 xampp\mysql\bin
  • 打开我的.ini
  • 将“max_allowed_pa​​cket”从“1m”更改为“16m”(或更大)
  • 保存 my.ini 现在通过 XAMPP 控制面板重新启动 MySql。
于 2011-06-29T17:05:51.610 回答