Getting Error When Moving To a New Host

Getting Error When Moving To a New Host

by Alton Graham -
Number of replies: 5

Hello, I switched hosts yesterday and on the new host I thought i copied over everything, when I tried going to the site I got a few errors which I fixed in config.php but I cannot fix this one:

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

seems I left out the moodledata folder and I honestly don't know how to get it back as the old host is cancelled. I reinstalled and redid moodle on wamp to try using that moodledata file when it came up and I uploaded I got a Internal Server error. It is used for my school and I really need help retrieving I have the dbase and all

Average of ratings: -
In reply to Alton Graham

Re: Getting Error When Moving To a New Host

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Alton,

I'm sorry to say that if you did not have a backup of the 'moodledata' folder from the old site then you've lost every single file that was ever uploaded and stored on that site.  The DB only contains textual information and links to content in the 'moodledata' folder.  To get the site up a bit, then you can create a folder outside of the web server served folders and then make $CFG->dataroot look at it, i.e.:

$CFG->dataroot  = 'F:\moodledev\moodlegjb\moodledata';

then Moodle will create the content it needs in that folder automatically.

G

In reply to Alton Graham

Re: Getting Error When Moving To a New Host

by Ken Task -
Picture of Particularly helpful Moodlers

If you switched from a host just a day ago, I think I'd make a plea to the old hosting provider for assistance before giving up!!!  Surely they maintain backups of servers/customer sites going back further than one day!!!!   They might have one ....  not recent but it's better than nothing!

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Alton Graham

Re: Getting Error When Moving To a New Host

by Alton Graham -

Well they wouldn't help, saying they cannot do anything which I know isn't true, I paid for another month just to get the file and I did but I get this error now


Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@camperdownhigh.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

In reply to Alton Graham

Re: Getting Error When Moving To a New Host

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
So moodledata is not a file but a whole folder of folders and files...

You need to make sure that you have the whole folder transferred over correctly, make sure that permissions are correct on it and that config.php is pointed to it correctly. 

If all the above is correct, I would recommend starting from scratch again. (Take your original database, moodledata folder and moodle folder and follow the migration steps)  It sounds like you tried to direct to a wrong folder in the meantime and that might have corrupted something somewhere.