DRUPAL_ROOT is /var/www/sites.
Warning: require_once(/var/www/sites/includes/bootstrap.inc): failed to open stream: No such file or directory in /var/www/sites/all/modules/contrib/registry_rebuild/registry_rebuild.php on line 15 Fatal error: require_once(): Failed opening required '/var/www/sites/includes/bootstrap.inc' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/sites/all/modules/contrib/registry_rebuild/registry_rebuild.php on line 15

This is incorrect -- drupal root is in /var/www.
Is it maybe getting confused by the contrib folder?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rfay’s picture

You actually have to edit registry_rebuild.php (if you're using that technique) to tell it where DRUPAL_ROOT is if it's not in the expected location. I think this is explained on the project page. Better approaches are welcome.

rfay’s picture

Status: Active » Fixed

Yeah

*If* your modules are not in sites/all/modules, you will probably have to edit registry_rebuild.php to set DRUPAL_ROOT to what it should be.

Again, alternate suggestions are welcome.

joachim’s picture

Hmm it's a pretty standard configuration, so maybe drupal root could sniff for index.php and if not found that many folders up, go one higher?

rfay’s picture

Title: DRUPAL_ROOT gets set incorrectly » Do more ambitious search for DRUPAL_ROOT in registry_rebuild.php
Category: bug » feature
Status: Fixed » Active

Ought to work.

joachim’s picture

Status: Active » Needs review
FileSize
1.26 KB

Here's a patch; not sure how best to handle an error if nothing is found.

rfay’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.