Drupal安装PDOException

shi*_*bly 3 php drupal drupal-6

http://localhost 有问题:

PDOException:SQLSTATE [42S02]:找不到基表或视图:1146表'drupal_test.semaphore'不存在:SELECT expire,value FROM {semaphore} WHERE name =:name; lock_may_be_available()中的数组([:name] => variable_init)(/var/www/drupal/includes/lock.inc的第165行).

这是我的数据库配置:

$databases = array (
  'default' => 
  array (
    'default' => 
    array (
      'database' => 'drupal_test',
      'username' => 'root',
      'password' => 'XXX',
      'host' => 'localhost',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => '',
    ),
  ),
);
Run Code Online (Sandbox Code Playgroud)

该怎么办?

ale*_*nce 9

这恰好发生在我身上.我手动将数据库信息添加到settings.php并尝试通过访问来运行安装脚本http://localhost/mysubdirectory,而不是通过安装脚本添加db info.Drupal看到了db信息并认为它已经安装,因此它查找了Drupal表,找不到它们并抛出错误.

我的解决方案就是手动运行脚本(导航到http://localhost/mysubdirectory/install.php).希望这可以帮助!