Lamp空间安装Drupal6时候出现如下问题
在空间安装Drupal6的时候出现问题,提示如下:
The following error must be resolved before you can continue the installation process:
register_globals is enabled. Drupal requires this configuration directive to be disabled. Your site may not be secure when register_globals is enabled. The PHP manual has instructions for how to change configuration settings. (Currently using PHP register globals Enabled ('1'))
Please check the error messages and try again.
出现这个问题的原因是由于服务器数据库不兼容导致无法获取安装日志导致的.解决办法有2个.
1,如果你的服务器支持php.ini的话,在主机下添加一个php.ini文件加上一句register global off的语句就可以了.
2,如果不支持php.ini 或者没有权限添加,只有修改程序的文件来解决了.修改Drupal6程序里的modules/system/system.install 安装文件.
找到这段代码:
$requirements['php_register_globals'] = array(
'title' => $t('PHP register globals'),
);
$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');
}
更改为:
$requirements['php_register_globals'] = array(
'title' => $t('PHP register globals'),
);
$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']['value'] = $t('Disabled');
}
else {
$requirements['php_register_globals']['value'] = $t('Disabled');
}
这样修改之后就OK了.经过本人测试有效,如果你按照我的要求操作仍然出现安装错误,哪么就是mysql数据库的版本过度,小哀建议你更换服务器.
注:Lamp=linux+apche+mysql+php











