深度阅读

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

作者
作者
2023年08月22日
更新时间
8.61 分钟
阅读时间
0
阅读量

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’);
解决问题

博客作者

热爱技术,乐于分享,持续学习。专注于Web开发、系统架构设计和人工智能领域。