Default / 默认 · 9月 1, 2021

“解决drupal domain安装中出现的问题”


PHP Fatal error:  Cannot redeclare domain_bootstrap() (previously declared in /hom
e/wwwroot/sites/all/modules/domain/ in /home/wwwroot/sites/all/modules/domain/ 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/');
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.

include DRUPAL_ROOT . ‘/sites/all/modules/domain/’;
include_once(DRUPAL_ROOT . ‘/sites/all/modules/contrib/domain/’);
%d 博主赞过: