Hello Dear Friends...
I have problem of installing the Moodle 3.3+ On my host..
Moodle can't create Data Directory outside of public_html..
I contacted to server Administrator and and asked about this issue... They said that it was blocked for the security reason..
So then I decided to change the data directory location.. but install wizard says: "Dataroot location is not secure".. I created the "moodledata" directory in the public_html and chmoded it with "770" and also put there .htaccess file with: order deny,allow deny from all, but the result is the same, can't install...
Now I want to disable data directory check in Moodle installation (of course on my own risk)..
Please help how to disable it (I want moodledata directory inside my public_html)
here is the code where it checks the data directory..
//first time here? find out suitable dataroot
if (is_null($CFG->dataroot)) {
$CFG->dataroot = __DIR__.'/../moodledata';
$i = 0; //safety check - dirname might return some unexpected results
while(is_dataroot_insecure()) {
$parrent = dirname($CFG->dataroot);
$i++;
if ($parrent == '/' or $parrent == '.' or preg_match('/^[a-z]:\\\?$/i', $parrent) or ($i > 100)) {
$CFG->dataroot = ''; //can not find secure location for dataroot
break;
}
$CFG->dataroot = dirname($parrent).DIRECTORY_SEPARATOR.'moodledata';
}
$config->dataroot = $CFG->dataroot;
$config->stage = INSTALL_WELCOME;
}
What to change how to disable it..
Thank you very much in Advanced!