I have a multisite setup, where my DocumentRoot is /var/www/drupal.
and my sites folder is under /var/www/sites.

This structure was taken from guides on drupal.org and is very convenient when you want to manage a single drupal install, with different sites, and different developers (each get permission to his own sites folder).

However, image.php, includes the following code:

  while (!@stat('./includes/bootstrap.inc')) {
    chdir('..');
  }

which runs ad infinitum in my case.

In my case, I just added a chdir ('/var/www/drupal'); , but this is definitely not the proper solution. I would expect some kind of way to find out the DocumentRoot is required (but I am not sure exactly what).

Even if this does not get fixed soon, a patch that would avoid the infinite loop would be appreciated by people who would hit this problem (you can't access any page with gallery, until you get a php timeout - BAAHHH). Something along the lines of:

  while (!@stat('./includes/bootstrap.inc') && $dir != getcwd()) {
    $dir = getcwd();
    chdir('..');
  }

will at least avoid the loop (but will not display the gallery).

I am marking this as critical, since it causes a PHP timeout.

Comments

yhager’s picture

Title: PHP timeout when the BG is not installed under DocumentRoot » PHP timeout when BG is not installed under DocumentRoot