Moodle config.php changes after server migration

Asked by:
jtrummp / 26 Points
Time:
2012-05-03 1:13 pm EST
Category:
Moodle
Hits:
8,627
I just transferred my website to webhosting hub. I have a Moodle installation in a sub-directory (www.celestialacademy.com/ecpa). I can't get the moodle site to work. I think it has something to do with needing to adjust the config.php file settings in the moodle directory.

What should the new settings be (wwwroot, dirroot and dataroot) to be compatible with webhosting hub?

To ask this user for more information, please first login.

To submit an answer, please login.

ANSWERS

0

arnelc
Staff
13,269 Points
2012-05-03 3:08 pm EST
There are several things to consider when moving Moodle to a new server, and you have hit upon 3 of the most important items. Paths are based on your account.

The default web root for the Primary domain on your account would be: public_html

If you have installed Moodle to the subdirectory, then the path would be:

/public_html/ecpa/


The path is typically based on the user name and would look like this:

/home/celest18/public_html/ecpa/

The database server is typically set to "localhost."

If you need to reference the database, MySQL databases are normally prefixed by the user name. You can see this by logging into you Cpanel and then going to MySQL databases.

The name for your database will begin with "celest18_"


I hope this helps to answer your question. If you continue to have problems with your Moodle installation, please respond to this post, or contact technical support for further assistance.

Arnel C.

To submit a comment on this answer, please first login.

0

bradm
Staff
1,846 Points
2012-05-04 2:50 pm EST
Hi jtrummp,

I was able to dig into this a little further, and I wanted to post another answer here and let you know what I've found out.

When I visit www.celestialacademy.com/ecpa, I get a 404 error. This is because the folder's permissions were 777, and instead should be 755.

When I changed the folder permissions to 755, this resolved the 404 error and instead we saw this error:

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

Looking at your config.php file and comparing with the settings in our own config file for Moodle, it looks like the problem is where you are specifying your moodledata folder.

I didn't see a moodle data folder, so I created this in your account:
/home/your-user-name/moodle-data (which is in the same folder as your public_html). We then adjusted your config file to read:

$CFG->dataroot = '/home/your-user-name/public_html/ecpa/moodledata';

This resolved the error, however moodle then gave us a message that stated some files were missing and it wanted to upgrade.

After scanning your account, we didn't find a folder named moodledata (other than the one we created).

I believe that you will need to find that folder again on your old host and then use ftp to copy it to our servers. That hopefully should resolve the issue at hand.

Feel free to post any further follow up questions in the comments at the bottom of this page, we're more than happy to help further!

Thanks,
- Brad

To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.