Вопрос

I read moodles documentation where it says that if the data root directory has to be in the site's public html folder ( Please see that i can not create it outside it since i dont have sufficient privileges as i am using a free account ). then you have to chmod it to 770 and also use htaccess to protect it. Now i am creating the moodle inside my domain at folder /moodle/ and moodle uploads folder is /moodle-uploads/uploads/ and i have an .htaccess setup in /moodle-uploads/.htaccess where its contents are

order deny,allow
deny from all

as specified on http://docs.moodle.org/20/en/Creating_Moodle_site_data_directory

But still when i run the auto installer script it says the data root directory is not secure

Это было полезно?

Решение

This is not the best way of doing it but coding hack to just get rid of this error if you like try it..,

in moodle root go the install.php and if you are using 2.6 in line 341 or others versions search for is_dataroot_insecure() function and change it to false in the else if condition and try to install again,and that it..,

enter image description here

Другие советы

By default its going to give you warning for having it in the public html folder as according to the docs in the link you also provided.

Remember that by default moodle will issue a warning about moodle data directories created inside the web directory, but otherwise this directory can be located where you wish. You can later move or change the location of this directory, but if you do, be sure to edit the setting in the config.php file that sets this; e.g. if moodledata is under a directory called data, then it would look like this:

As long as you have configured the dataroot location with the moodle data directory and placed your .htaccess file in that folder it should be fine.

i'm using moodle 2.4.1 and had a some problem. the solution open install.php file and search for statment } else if (is_dataroot_insecure()) { and disabled. it's work for me

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top