Realpath(): open_basedir restriction in effect

I have installed moodle using softaculous on my subdomain: moodle.nesbs.ml but am getting the following error. what can i do.

Warning : realpath(): open_basedir restriction in effect. File(/home/vol4_5/epizy.com/username/moodledata) is not within the allowed path(s): (/php_sessions:/tmp:/var/www/errors:/usr/share/pear:/home/vol4_5/epizy.com/username/moodle.nesbs.ml/htdocs) in /home/vol4_5/epizy.com/username/moodle.nesbs.ml/htdocs/lib/setup.php on line 154
Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.

Moodle requires a data directory which is not in it’s website folder for security reasons, and we require PHP scripts to limit their access to their own website folder for different (but equally valid) security reasons.

The TL;DR is that you either need to try to configure Moodle to use a data directory in the web accessible folder (you can use .htaccess rules to restrict direct web access to it). If that doesn’t succeed, that means you may not be able to run Moodle on our hosting.

For the record: Softaculous is a production developed by a third party, and so is their software catalog. We don’t test every version of all software offered by Softaculous to validate it’s compatibility with our hosting or our terms.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.