"解决drupal domain安装中出现的问题"
Published on Aug. 22, 2023, 12:08 p.m.
PHP Fatal error: Cannot redeclare domain_bootstrap() (previously declared in /hom
e/wwwroot/sites/all/modules/domain/domain.bootstrap.inc:56) in /home/wwwroot/sites/all/modules/domain/domain.bootstrap.inc on line 56
解决方法
Note that conf_path() uses “include” and not “include_once” for sites.php, so the problem is likely caused there.
You might use this instead to load the include safely:
include_once(DRUPAL_ROOT . '/sites/all/modules/contrib/domain/settings.inc');
That should eliminate the duplicate function error.
We try to avoid include_once(), since it eats system resources. But you can try it here.
If that works, we should update the documentation.
我修改settings.php里的
include DRUPAL_ROOT . ‘/sites/all/modules/domain/settings.inc’;
为
include_once(DRUPAL_ROOT . ‘/sites/all/modules/contrib/domain/settings.inc’);
解决问题