I've installed Elysia in site/all/modules/contrib so bootstrap.inc cannot be found.
I suggest to change

if (!file_exists('includes/bootstrap.inc') && preg_match('@^(.*)[\\\\/]sites[\\\\/][^\\\\/]+[\\\\/]modules[\\\\/]elysia(_cron)?$@', getcwd(), $r))
  chdir($r[1]);

by

if (!file_exists('includes/bootstrap.inc') && preg_match('@^(.*)[\\\\/]sites[\\\\/][^\\\\/]+[\\\\/]modules[\\\\/].*elysia(_cron)?$@', getcwd(), $r))
  chdir($r[1]);

Comments

Anonymous’s picture

Thanks OP, I had the same exact problem and your solution fixed it.

gantenx’s picture

Issue summary: View changes

For sites where elysia_cron module is inside an installation profile, this pattern will works.

if (!file_exists('includes/bootstrap.inc')) {
  if (!empty($_SERVER['DOCUMENT_ROOT']) && file_exists($_SERVER['DOCUMENT_ROOT'] . '/includes/bootstrap.inc')) {
    chdir($_SERVER['DOCUMENT_ROOT']);
  } elseif (preg_match('@^(.*)[\\\\/](sites|profiles)[\\\\/][^\\\\/]+[\\\\/]modules[\\\\/]([^\\\\/]+[\\\\/])*elysia(_cron)?$@', getcwd(), $r) && file_exists($r[1] . '/includes/bootstrap.inc')) {
    chdir($r[1]);
  } else {
    die("Cron Fatal Error: Can't locate bootstrap.inc. Check cron.php position.");
  }
}
kala4ek’s picture

Status: Active » Closed (outdated)

Drupal 6 is not supported anymore.