Closed ywarnier closed 10 years ago
Until now, my intermediate solution is to add this in getDataFolders():
if (empty($sysPath)) {
$sysPath = $this->configuration['root_sys'];
if (empty($sysPath)) {
return null;
}
}
I traced the issue down to getSysPathFromConfigurationFile(), which erroneously tests where the main/install/index.php is located: if the Chamilo installation is properly made, this main/install directory shouldn't exist anymore (or it should not be readable, anyway).
This is the original code of getSysPathFromConfigurationFile():
$configurationPath = dirname($configurationFile);
// New structure
if (file_exists($configurationPath.'/../../main/install/index.php')) {
return realpath($configurationPath.'/../../').'/';
}
// Old structure
if (file_exists($configurationPath.'/../../install/index.php')) {
return realpath($configurationPath.'/../../../').'/';
}
This is the new one:
$configurationPath = dirname($configurationFile);
// New structure
if (file_exists($configurationPath.'/../../web/app.php')) {
return realpath($configurationPath.'/../../').'/';
}
// Old structure
if (file_exists($configurationPath.'/../../../user_portal.php')) {
return realpath($configurationPath.'/../../../').'/';
}
I have something close to a 1.9.8 version, and inside the getDataFolders() method (of ConfigurationHelper), the following line returns an empty string:
I believe this might be caused by recent changes to support v10, but I cannot find the exact source just yet (as I cannot find where the setSysPath() method is called from.