### $CFG->dataroot issues$CFG->dataroot issues

Hi,

Like many people here, I have $CFG->dataroot problems. The message I get is: Fatal error:$CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.

I have tried the following:

1. Specified the full unix path: /var/www/..../data/moodledata

2. Moved the directory into the subdomain path so that it can be accessed by the browser and specified the url: http://domain/data/moodledata

3. Moved a php script into this directory and verified that it can be executed

5. changed the owner to the subdomain owner and apache

I still get the error.

I am using PHP 5.2.16

Thanks.

Average of ratings: -
Re: $CFG->dataroot issues I solved the problem by using the official 2.0.2 and upgrading to php 5.3 Not sure which one did the trick... Average of ratings: - Re:$CFG->dataroot issues

i solved it .. u have to do this in the config file

$CFG->wwwroot = 'http://example.com/';$CFG->dataroot  = '/home/account username/public_html/moodledata';
$CFG->admin = 'admin'; Average of ratings: - Re:$CFG->dataroot issues

Yasser, DUUUUUUUUDE!  Thanks. I've been wrestling with this for hours.

Average of ratings: -
Re: $CFG->dataroot issues This is wierd. Yasser solves Karim's problem, which Karim himself solved 4 days earlier, there by solving John's problem, which is yet to appear! SCNR Average of ratings: - Re:$CFG->dataroot issues

Hi Yasser!
Well, I have the same problem. My environment: Win Server 2008 R2 + IIS 7.0 + PHP5.3.8. Underneath an excerpt from <setup.php>. Unerneath an excerpt of moodle/lib/setup.php:

 $CFG->dataroot = realpath($CFG->dataroot);
 068 if ($CFG->dataroot === false) {   069  if (isset($_SERVER['REMOTE_ADDR'])) {
 070         header($_SERVER['SERVER_PROTOCOL'] . ' 503 Service Unavailable');   071  }   072  echo('Fatal error:$CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.'."\n");
 073     exit(1);

This is my error message. Now, I figure, the "directory" being mentioned here is "moodledata", right?

Could you confirm, and maybe advise on how to proceed from here?

Thanx a lot.

Werner (from Germany)

Average of ratings: -
Re: $CFG->dataroot issues While installing Moodle 3.04 on Linux Cpanel, I got the same error: Fatal error:$CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.

Here, the message "dataroot" refers to the "moodledata" not to be confused by the moodle root or home directory.

To resolve, edit the config.php.

For example, my wrong file was like this:

$CFG->dataroot = '/moodledata/datadir'; But we need to specify the FULL path, like this:$CFG->dataroot  = '/home/crg/moodledata/datadir';

Average of ratings: -