DataRoot On a different server

DataRoot On a different server

by Joshua Kalbow -
Number of replies: 2

Hello All,  I am looking for a little bit of assistance in setting up my dataroot location,  I have moodle installed on a windows server with godaddy and it was working great.  Recently godaddy shut it down because the data file was too large for our user agreement.  I have decided to move the file to a cloud server that we have that hosts several of our other websites, however i am getting a data root error when pointing to the new folder on a different server,  I am using the url of the location.


Any suggestions?


thank You


<?php  // Moodle configuration file


unset($CFG);

global $CFG;

$CFG = new stdClass();


$CFG->dbtype    = 'mysqli';

$CFG->dblibrary = 'native';

$CFG->dbhost    = 'XX.XX.XXX.XXX';

$CFG->dbname    = 'aviatorcollege_moodle';

$CFG->dbuser    = 'moodle';

$CFG->dbpass    = 'XXXXXXXXX';

$CFG->prefix    = 'mdl_';

$CFG->dboptions = array (

  'dbpersist' => 0,

  'dbsocket' => 0,

);


$CFG->wwwroot   = 'http://moodle.aviator.edu';


$CFG->dataroot  = 'http://moodlenewlocation.com/moodledata';

$CFG->admin     = 'admin';


$CFG->directorypermissions = 0777;


$CFG->passwordsaltmain = 'B8QP~j33!HvZ7?yz4(t&!FFi`*A9f+';


require_once(dirname(__FILE__) . '/lib/setup.php');


// There is no php closing tag in this file,

// it is intentional because it prevents trailing whitespace problems!

Average of ratings: -
In reply to Joshua Kalbow

Re: DataRoot On a different server

by Paul Verrall -

Hiya,

Dataroot is a folder (aka directory) not a file, many files are stored within it.

When setting your dataroot in your config.php this should be a reference to a file-system location that the webserver can read and write to, you simply cannot do this over HTTP.

You could potentially use NTS to mount the filesystem from your remote server but I would expect this to perform badly and it feels like you'd be heading 'down the rabbit hole' of generally bad configuration ideas. I would not advise it.

In reply to Paul Verrall

Re: DataRoot On a different server

by Paul Verrall -

I should probably add that my reservations over NFS are over using it between a GoDaddy host and some other cloud server and not a over the performance of NFS in general.