Installation help

Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.

 
 
The Renewable Network Logo
Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.
 

Tried upgrading from 1.9 to 2.  In cPanel renamed "moodle" to "oldmoodle" then unzipped Latest into same root folder. All went well. Then copied the config.php file from the oldmoodle folder to the new moodle folder. Now when I try accessing the site this is what I get.

Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.

Anybody?

 
Average of ratings: -
It's only an avatar...
Re: Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.
Group DevelopersGroup Documentation writersGroup Particularly helpful MoodlersGroup Testers

Oh dear! It's not that easy, if only it were!

Have you read any documentation regarding updating Moodle from 1.9 to 2.0...???

If not then I suggest you do so.

Upgrading to Moodle 2.0

Mary

 
Average of ratings: -
The Renewable Network Logo
Re: Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.
 

Mary - I did read the Docs several times and viewed the video tutorial recommended in those docs. Followed every step to the "T".

 
Average of ratings: -
It's only an avatar...
Re: Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.
Group DevelopersGroup Documentation writersGroup Particularly helpful MoodlersGroup Testers

OK...well that may be so, but I can't see how you are using the config.php from Moodle 1.9 as the config.php in Moodle 2.0 is different.

What I think you should have done is rename Moodle 2.0 config_dist.php to config.php then put in the correct settings for the database and such as well as $CFG->dataroot = 'whatever the url is'; but not use the Moodle 1.9 config.php.

EDIT!

I've just looked at the cPanel video. I see now what you have done. This is the problem...that Video needs updating.

To try and fix this you could do as I explained above, and providing you put in the right information into the Moodle 2.0 config.php you should be go to go!

Mary

 
Average of ratings: -
The Renewable Network Logo
Re: Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.
 

Mary-Thanks so far.

I am PHP challenged. I see there is a config_dist.php file already in the directory but when I take a look inside there is more code then I could deal with. I would have no problem copy/pasting the code from the config.php file but 1) would not know where it goes and 2) I would not know how to make the changes relative to the database etc.

I am not sure where to go from here.?? Prior to attempting the upgrade I did a lot of searching for instructions and everything I found led me to the standard Moodle Docs pages on upgrades and/or to the tutorial video we are talking about. It may be that only the more technicals have been doing the upgrade to 2.0 so far and so it has not been an issue since they know what they are doing. I may have attempted it too early since there is no readily available documentation out there yet about the config_dist.php thing. ???

 
Average of ratings: -
It's only an avatar...
Re: Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.
Group DevelopersGroup Documentation writersGroup Particularly helpful MoodlersGroup Testers

Hi Mike,

I understand your problem with the config-dist.php, it is rather wordy.

If you read it like a document it is more, or less self explaintory.

The written comments are hidden from the code between the // which if you are not used to is looks daunting// ...but it isn't really.

All you need to do is take it slowly.

Print a copy of your old config.php so you can refer to it.

Then little by little find each of the $CFG-> elements corresponding to what you have on you config.php cribsheet and make the amendments to the config-dist.php

When you have copied all that's on your cribsheet, then save the config-dist.php as config.php and place it in the same folder as config-dist.php. That's all there is to it.

There is a lot of code in the config-dist.php that you don't need to worry about. Some of it will not be relevent, so you can ignore it.

Give it a try, at least. Follow the instructions at the end of the config-dist.php for how to complet the upgrade.

The thing with Moodle 2.0, is that it is not yet stable enough for a full production site, but OK enough for testing, getting familiar with the way it works, designing and testing themes, etc., And since it is still being developed and not ready to be rolled out proper yet, Moodle Doc are few and far between, and as you are finding, not much help, especially when using cPanel.

You know after you get this site up and running you will be able to write a new Moodle Doc on the subject! smile

Best of luck

Mary

 
Average of ratings: -
Picture of Micky Fokken
Re: Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.
 

I am recieving the same error.

The Moodle 2.0 documentation (http://docs.moodle.org/en/Upgrading) says "Copy your old config.php file back to the new Moodle directory."  I also interpreted it as meaning overwrite my 2.0 config.php file with my 1.9 config.php file.

Maybe someone could run through all the instructions and make sure they are correct?

I am using Mary's suggestions now, editing the Moodle 2.0 config.php file to contain the correct info.

 
Average of ratings: -
Picture of Micky Fokken
Re: Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.
 

solution:  When all else fails - read the error message.  My moodledata folder was not included in the moodle 2.0 install.  I copied my own moodledata folder to the location specified and the error message went away like magic.

 
Average of ratings: -
Picture of sean lancaster
Re: Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.
 

i waited until today (end of semester) to upgrade to 2.0 from the final 1.9.9.

i have the same error that Mike received, unfortunately.

i'll play with the stuff that Mary noted. dang.

Did her suggestion work? i don't understand why the upgrade instructions told me to copy the config.php file if i was supposed to use the config-dist.php file instead. also, this is my second site i am upgrading and the first one didn't get this error.

 
Average of ratings: -
Picture of sean lancaster
Re: Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.
 

i think i figured out my error. i have a folder called classesdata on the old site and not on the new. it contains files that were uploaded for individual classes by me (e.g., readings, sample documents), etc. and is where dataroot points in the config file, yet it's not in the new installation. i am copying it there now and we'll see if the install continues without error after that. thoughtful

 
Average of ratings: -
Picture of Colin Webber
Re: Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.
 

I did a clean install ie I trashed my whole xampp folder with Moodle 1.9 on my mac (I had not used it much, just a little experimenting).  Then I downloaded 2.2 and installed it.

 

I get the error mentioned here, and have no config file to refer to.

Can I do a "wipe" some how  and start again?  I have course backups with my experiments so can re-import them

 
Average of ratings: -
Picture of Jose Perez
Re: Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.
 

Hi Guys,

Today I had the same error message.  Found out that it the moodle data directory was inside the moodle directory so it got moved when I renamed the directory moodle to moodle_old.   Copied the moodledata directory to another place (outside the moodle directory as recomended) and updated the config.php to reflect the new location.  Problem solved.

Hope this helps.

Jose Perez Bobadilla
SDT Learning, Corp.

 
Average of ratings: -
Picture of Web Master
$CFG>dataroot is not configured properly...
 

Moodle tries to create a directory called 'moodledata' outside the main location of the Moodle website files. This is for security reasons (inaccessible to http).

If your host blocks this, or the path is incorrect then Moodle will not create the directory.

The solution is either creating the directory manually and then updating config.php

"$CFG->dataroot  = '[pathwaytothemoodledatafolder]/moodledata';

Or ask your host provide to do this for you. Remember, the moodledata folder should be located outside of where your site actually resides on the server (eg. not in the same location as config.php or index.php, index.htm etc.)

Here is the moodle wiki that explains it:

http://docs.moodle.org/20/en/Creating_Moodle_site_data_directory

 

 

 
Average of ratings: -