在 Drupal 7 主题中,drush 不起作用
In Drupal 7 theme, drush doesn't work
我需要修复基于 Drupal 7 构建的站点样式中的错误。但是当我更改样式中的一些行时,浏览器中没有任何变化。当我 运行 "drush cc all" 时,我在我的终端中看到了下一个(完整日志包含超过 45k 的符号):
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'fr_bote.watchdog' doesn't exist: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (: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); Array
我不知道怎么解决,请帮帮我!感谢您的提前!
**编辑
drush status
Drupal version : 7.34
Site URI : http://default
Database driver : mysql
Database hostname : localhost
Database username : admin
Database name : fr_bote
Database : Connected
Drupal bootstrap : Successful
Drupal user : Guest
Default theme : bote
Administration theme : shiny
PHP configuration : /etc/php5/cli/php.ini
Drush version : 5.0-dev
Drush configuration :
Drupal root : /var/www/my-website
Site path : sites/default
File directory path : sites/default/files
Temporary file directory path : /tmp
消息很清楚:
您的数据库中缺少 Table fr_bote.watchdog
。您必须创建它。
我想 Drush 找不到您的数据库。您应该使用
来调用它
drush -r /path/to/drupal -l your.website.url
以便 drush 找到您的安装目录以及正确的 sites/folder,此站点的 settings.php
所在的位置。
也许使用 sites/default/settings.php
作为后备并指向一个空数据库?
使用 drush 的最佳方式是习惯站点别名(例如从 https://duckduckgo.com/?q=drush+site-aliases 开始)。站点别名定义根路径以及 drupal 安装的 base.url。您甚至可以为远程 drupal 安装定义别名。 Drush 通过 ssh 连接它们——无需离开本地 shell.
有解决办法!问题出在设置数据库中。在文件 php.ini
中更改了字段 max_execution_time
,并且 upload_max_filesize
的值很大,删除旧表,再次导出 - 导入表,一切正常!
我需要修复基于 Drupal 7 构建的站点样式中的错误。但是当我更改样式中的一些行时,浏览器中没有任何变化。当我 运行 "drush cc all" 时,我在我的终端中看到了下一个(完整日志包含超过 45k 的符号):
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'fr_bote.watchdog' doesn't exist: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (: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); Array
我不知道怎么解决,请帮帮我!感谢您的提前!
**编辑
drush status
Drupal version : 7.34
Site URI : http://default
Database driver : mysql
Database hostname : localhost
Database username : admin
Database name : fr_bote
Database : Connected
Drupal bootstrap : Successful
Drupal user : Guest
Default theme : bote
Administration theme : shiny
PHP configuration : /etc/php5/cli/php.ini
Drush version : 5.0-dev
Drush configuration :
Drupal root : /var/www/my-website
Site path : sites/default
File directory path : sites/default/files
Temporary file directory path : /tmp
消息很清楚:
您的数据库中缺少 Table fr_bote.watchdog
。您必须创建它。
我想 Drush 找不到您的数据库。您应该使用
来调用它drush -r /path/to/drupal -l your.website.url
以便 drush 找到您的安装目录以及正确的 sites/folder,此站点的 settings.php
所在的位置。
也许使用 sites/default/settings.php
作为后备并指向一个空数据库?
使用 drush 的最佳方式是习惯站点别名(例如从 https://duckduckgo.com/?q=drush+site-aliases 开始)。站点别名定义根路径以及 drupal 安装的 base.url。您甚至可以为远程 drupal 安装定义别名。 Drush 通过 ssh 连接它们——无需离开本地 shell.
有解决办法!问题出在设置数据库中。在文件 php.ini
中更改了字段 max_execution_time
,并且 upload_max_filesize
的值很大,删除旧表,再次导出 - 导入表,一切正常!