In the latest CivicSpace release (0.8.5) and attempting to use the massmailer module, I am getting the same old error:
"The database configuration information could not be loaded from the drupal configuration file: default/settings.php"
I have read dozens of postings where others have had this problem, too and have attempted various fixes. None have worked for me. Most fixes seem to center around the idea that the module cannot find the conf.php file. However, the error displayed in the browser comes directly from a die command in that file. So, the file must be running. A little investigation and it seems the problem may actually be in this function:
function drupal_conf_init() {
$args = parseCline();
$uri = $args['d'];
$site = strtolower(strtr($args['h'] . substr($uri, 0, strrpos($uri, '/')), '/:', '..'));
while (strlen($site) > 4) {
if (file_exists('../../../../../../sites/'. $site .'/settings.php')) {
return $site;
}
else {
$site = substr($site, strpos($site, '.') + 1);
}
}
return 'default';
}
Now, I haven't done any coding since back in my college days, so it's been quite a while, but what is the point of calling the else{} statement if it is going to return 'default' when it fails the if{}? Shouldn't it return the site name converted into the dot delineated folder name where the current site's settings.php file is located. That is, after all, the file it is looking for. Is it not? I.e., the function should be returning something like, 'www.mysite.com.subdirectory' and the calling function will then prepend that onto the file name it is trying to find. So, 'sites/www.mysite.com.subdirectory/settings.php'.