Drupal 6.2多站点安装BUG以及关于register_globals的错误

Drupal6.2中的多站点安装有一个BUG
如果两个站点共享一部分数据库例如
站点1的setting为
* $db_prefix = array(
* ‘default’ => ‘main1_’,
* ‘users’ => ‘shared_’,
* ‘sessions’ => ‘shared_’,
* ‘role’ => ‘shared_’,
* ‘authmap’ => ‘shared_’,
* ‘sequences’ => ‘shared_’,
* );
*
站点2的setting为
* $db_prefix = array(
* ‘default’ => ‘main2_’,
* ‘users’ => ‘shared_’,
* ‘sessions’ => ‘shared_’,
* ‘role’ => ‘shared_’,
* ‘authmap’ => ‘shared_’,
* ‘sequences’ => ‘shared_’,
* );
*
则安装站点1的时候不会提示错误,但是安装站点2的时候酒会提示’shared_’数据表重复,以及很多错误
解决办法是安装站点2的时候先安装到不同的表里面,也就是设置表前缀位一样的
最后再设置为不同的
再把数据库里多余的表删除掉
这个bug已经在drupal官方人员测试出现过
只不过被我遇到了,这里用中文表述一下。

另外,服务器如果$register_globals是打开的
则安装不下去
此时如果没有服务器修改权限,则
打开
\modules\system\system.install
找到

$register_globals = trim(ini_get('register_globals'));
  // Unfortunately, ini_get() may return many different values, and we can't
  // be certain which values mean 'on', so we instead check for 'not off'
  // since we never want to tell the user that their site is secure
  // (register_globals off), when it is in fact on. We can only guarantee
  // register_globals is off if the value returned is 'off', '', or 0.
  if (!empty($register_globals) && strtolower($register_globals) != 'off') {
    $requirements['php_register_globals']['description'] = $t('<em>register_globals</em> is enabled. Drupal requires this configuration directive to be disabled. Your site may not be secure when <em>register_globals</em> is enabled. The PHP manual has instructions for <a href="http://php.net/configuration.changes">how to change configuration settings</a>.');
    $requirements['php_register_globals']['severity'] = REQUIREMENT_ERROR;
    $requirements['php_register_globals']['value'] = $t("Enabled ('@value')", array('@value' => $register_globals));
  }
  else {
    $requirements['php_register_globals']['value'] = $t('Disabled');
  }


注释掉!

3 comments

  1. Mauricio Pletz 说道:

    I just want to tell you that I am just beginner to blogs and really liked your page. More than likely I’m planning to bookmark your website . You definitely come with tremendous stories. Many thanks for sharing your web site.

  2. Jamie Nagode 说道:

    One other thing to point out is that an online business administration course is designed for learners to be able to without problems proceed to bachelors degree programs. The Ninety credit diploma meets the other bachelor college degree requirements then when you earn the associate of arts in BA online, you may have access to the latest technologies in this field. Some reasons why students have to get their associate degree in business is because they can be interested in the field and want to have the general education and learning necessary just before jumping in to a bachelor college diploma program. Thanks alot : ) for the tips you actually provide with your blog.

发表评论

电子邮件地址不会被公开。