Installation help

 
 
Picture of kate anderson
dataroot is not configured properly error
 

Mahara, XAMPP, and database all installed on my Windows 7 laptop, without issue.

Moodle 2.5 Installation broke at the database installation point with an error message - couldn't create database.

I checked the config file and it transpired that no file had been created from the config distribution.

I created a config file with the following data:

$CFG->dbtype = 'mysql5';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'admin';
$CFG->dbpass = '';
$cfg->wwwroot = 'localhost/moodle/htdocs/';
$cfg->dataroot = 'c:\\xampp\\htdocs\\moodle';

I am now getting this error, can anyone shed any light on this for me?

Warning: Creating default object from empty value in C:\xampp\htdocs\moodle\config.php on line 57
Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.

Thanks in advance

 
Average of ratings: -
Picture of Jaswinder Singh
Re: dataroot is not configured properly error
Group Testers

Hi Kate,

According to Moodle docs,  For security purposes, it is CRITICAL that moodledata directory is NOT accessible directly via the web.

which means that you should not keep your moodledata directory in \htdocs folder. It can be placed under c:\\xampp\\moodledata\\moodle

Else if you want to use it in \htdocs directory only, then you can protect the access from .htaccess file in moodledata folder.

 
Average of ratings: -
Picture of kate anderson
Re: dataroot is not configured properly error
 

Hi Jaswinder,

Thankyou for responding.  I began the whole process again and I now have Moodle installed.

Kate

 
Average of ratings: -
Sketch...
Re: dataroot is not configured properly error
Group Particularly helpful Moodlers

On Windows it should probably be single slashes:

$cfg->dataroot = 'c:\\xampp\moodledata\moodle';

 
Average of ratings: -