【问题标题】:Failed opening required database.inc (attempting to use drupal)未能打开所需的 database.inc(尝试使用 drupal)
【发布时间】:2014-04-27 19:47:51
【问题描述】:

我正在尝试使用 FreeBSD 设置一个 drupal Web 服务器。

当我尝试访问 drupal 索引时,我受到了欢迎:

致命错误:require_once():需要打开失败 '/usr/local/www/apache24/data/drupal/includes/database/sqlite/database.inc' (include_path='.:/usr/local/share/pear') 在 /usr/local/www/apache24/data/drupal/includes/database/database.inc 上 第 1685 行

我是 freeBSD 的新手,但我尝试将 chmod 667 设置为:

sqlite/database.inc
database/database.inc
sqlite
database

另外,我不明白它为什么要寻找/usr/local/share/pear,因为没有这样的目录。

我正在使用 MySQL55、PHP5、Drupal-7 和 Apache。

我认为这可能是相关的,但是当我访问 install.php 时,我得到:

未定义索引:drupal_install_profile_distribution_name() 中的 distribution_name(/usr/local/www/apache24/data/drupal/includes/install.inc 的第 201 行)。

【问题讨论】:

  • 更新,foing以下后不再立即超时报错:chmod u+rwx,g+rwx,o+wrx database/sqlite/database.inc

标签: php mysql drupal drupal-7


【解决方案1】:

你用过 drush 吗?

看起来好像您已经安装了drupal,或者至少drupal 是这样认为的。以及错误的数据库设置。通常会在网页界面提示您输入,但您也可以直接在设置 php.ini 中输入。可能你应该移动旧的 settings.php 并在浏览器中运行 install.php 并重新输入数据库详细信息。

drupal_install_profile_distribution_name 可以在 system->standard_profile 和 variable->install_profiles 下的数据库中直接更改或使用 drush (www.drush.ws) 与

vset install_profile 标准

或您使用的任何其他安装配置文件。

无论如何,安装脚本也会要求这样做。

希望,这是你的问题。

【讨论】:

  • 我用 drush “安装”了 drupal。有没有可以用来卸载 i 的 drush 命令,或者最好的方法是什么?
  • 我现在知道了。似乎手动下载和提取它而不是使用 drush 更容易做到。
  • yip :) 尽管 drush 是一个非常酷的工具,但对于初始设置,我更喜欢 drupal install.php。当您每天运行几个测试站点时,情况可能会有所不同...
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-02-09
  • 2012-03-26
  • 2012-04-12
  • 1970-01-01
  • 1970-01-01
  • 2014-10-02
  • 2011-05-27
相关资源
最近更新 更多