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

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

by Abishek Keerthi Narayan -
Number of replies: 4

Hi, 


We have a moodle 2.8 installed. While everything was working fine until yesterday, we began getting  "Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting." since morning.

I have checked and rechecked the dataroot path in config.php, checked for the folder and it all exists. And absolutely nothing changed between yesterday and today.

I confirmed from my webhost about open_basedir being disabled.

Please help me resolve this.

Site: online.metisindia.com

Average of ratings: -
In reply to Abishek Keerthi Narayan

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

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Something changed, but what is not immediately obvious. I assume you have checked the config.php file to make sure the paths to the database, the password and the moodledata directory are right? Has anyone checked the database to ensure that the database is responding to the correct path, the correct root password? Has there been a check of the server logs? Do you have PHP error logs setup and running? 

Has there been a change on the server itself? When the "dataroot" is not functioning, I have found that there has been a server change, You sure nothing there has changed? 

In reply to Colin Fraser

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

by Abishek Keerthi Narayan -

Thank you very much Colin. 

Yes something had changed!

Our service providers moved to a new datacenter as of yesterday and "somehow" the control panel didn't change to reflect the right path to the moodledata folder. After talking to them a couple of times, we figured out the right path.

Thanks very much for your help!

In reply to Abishek Keerthi Narayan

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

by Conn Warwicker -
Picture of Core developers Picture of Plugin developers

CHeck to make sure the permissions haven't changed on the directory, so that your web server can still read and write to it

In reply to Conn Warwicker

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

by Abishek Keerthi Narayan -

Thank you Conn. The issue was with our web hosts moving to a new data center and for some odd reason changing the root folder names. 

Thanks for the help!