Moved Installation

Moved Installation

by Athena Divine -
Number of replies: 22

I moved my entire installation from akkadianaturaegrove.com/education to themagicakalgroveacademy.net which including transferring the database and changing the config.php to point towards that new database.  When I go to themagickalgroveacademy.net, this is what I get:


TMGA

What do I do?  What did I miss?

Average of ratings: -
In reply to Athena Divine

Re: Moved Installation

by Albert Ramsbottom -

Did you point the config to this address, I mean the access part of the config as well as the database

And I assume that the DNS is set up for this change?


Albert

In reply to Athena Divine

Re: Moved Installation

by Ken Task -
Picture of Particularly helpful Moodlers

When the fully qualified domain name of the server changes on a move like you have done, three things:

1. DNS - which is apparently working

2. in config.php of the moved site: $CFG->wwwroot   = 'http://example.com/moodle'; (has to be the new)

3. then one has to run the search and replace tool ... http://site/admin/tool/replace/

That tool provides a search box ... http://olddomainname/educaton/

replace with ... http://newdomainname/

Caution: in the new themagicakalgroveacademy.net is moodle in an /education directory?

IF NOT, then the search needs olddomain/education/ and the new site needs only the themagicakalgroveacademy.net/

Make sure you include the http:// in front and training slash at the end.

Make sure it's accurate as there is no un-do.

'spirit of sharing', Ken

In reply to Ken Task

Re: Moved Installation

by Athena Divine -

This is what I got:


Warning: Division by zero in /home/tmganet/public_html/config.php on line 21

Warning: Division by zero in /home/tmganet/public_html/config.php on line 21

Warning: Division by zero in /home/tmganet/public_html/config.php on line 21

Warning: Division by zero in /home/tmganet/public_html/config.php on line 21

Warning: Cannot modify header information - headers already sent by (output started at /home/tmganet/public_html/config.php:21) in /home/tmganet/public_html/lib/setup.php on line 146
Fatal error: $CFG->dataroot is not specified in config.php! Exiting.

In reply to Athena Divine

Re: Moved Installation

by Just H -
The last line is pointing to the error - make sure you have specified the correct data root for the new server in config.php.
In reply to Athena Divine

Re: Moved Installation

by Ken Task -
Picture of Particularly helpful Moodlers

This is  what you got when?   After editing config.php and changing the URL to the site by it's new fully qualifed domain name?

Each line in config.php that has a variable ends with a ";" (semicolon).

Line 21 of a config.php file might be the culprit ... what does line 21 say?

'spirit of sharing', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Moved Installation

by Athena Divine -
Ok I finally got it to work but now it's not showing the graphics.  I'm so confused....  Anytime I try to do anything I get one of two errors:


Permissions Problem

Internal Server Error


In reply to Athena Divine

Re: Moved Installation

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Did you ever have a copy of Moodle working correctly at themagicakalgroveacademy.net?

Sometime, I prefer to get a fresh copy of moodle working in the new location first, and then move my moodledata and the database to this new server second.  Just a suggestion for you to consider.

In reply to Rick Jerz

Re: Moved Installation

by Athena Divine -
Decided to take your advice and just install the latest moodle.  So I downloaded the zip, uploaded it to my files manager and the unzipped it to my directory.  Now, this is what I get?  Do you see anything different?


Internal Server Error

In reply to Athena Divine

Re: Moved Installation

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Did you create a database?  At this point, maybe you can share your config.php contents with us, but leave off password information.

In reply to Athena Divine

Re: Moved Installation

by Ken Task -
Picture of Particularly helpful Moodlers

Think you were sooooo close in changing the url to your site back when you first reported an issue.   All you had to do back then was change the  $CFG->wwwroot = line in your config.php file to contain the new themagicakalgroveacademy.net domain.   That's what the yellow screen said with the continue button at the bottom.   Clicking continue would have taken you to the site by it's changed name.

Just unzipping moodle code won't install a fresh instance and won't fix what was broken (just a little).

Now, however, it appears your wwwroot line in config.php is set to:

$CFG->wwwroot   = 'http://localhost';

It should read:

$CFG->wwwroot   = 'http://themagicakalgroveacademy.net';

'spirit of sharing', Ken

In reply to Ken Task

Re: Moved Installation

by Athena Divine -
Ok so I put all the files from my old domain back into my new domain, then connected the new database from the new domain, which is filled with the old domains database information. using this:


Moodle Config

Doing that, still gave me this, do you see the same (in Google Chrome)?

ise

Same thing in a different browser (Firefox):

isefirefox

In reply to Athena Divine

Re: Moved Installation

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

We are all trying to help you with by providing some small changes (remove a semicolon) and some bigger changes (try installing a fresh copy of moodle).

Thanks for posting your config.php.  A small suggestion would be remove the ending "/" in line 20.  I doubt this will help, but in my installs I my config.php does not have this ending "/", even though I think that it is technically fine.

On the bigger side, you never got your new install of moodle to work.  So I wonder how you are really installing moodle, and if your server is fully ready to run moodle.  Could be a number of things, and others here might be able to more quickly guide you.

When I install moodle from scratch, I do it in the following way.  Maybe you will see something here.

1) First, I make moodle be in a folder off of my may url, such as www.mydomain.com/moodle.  You appear to be making moodle be your main URL, which is no problem, but you could try an experimental install of moodle in its own folder.

2) Then, I create the database.  I do this with the cPanel tools on my VPS, but one can do this at the command line.  Then I use phpMyAdmin to change the collation to utf8_unicode_ci .  How have you created your database, and have you changed its collation?

3) Then, I manually create my moodledata folder one level down from my "public_html" folder.  If this is an experimental install, I name it something like moodledata04, just so that I don't disturb my production copy.  I change its rights which a chmod 777 moodledat04 command issued via an ssh session.  There are other ways of doing this.  How are you doing this?

4) I prefer the tar versions of the moodle program.  But the zip is find.  I download the moodle program into a temporary area (a moodletmp folder), then I un-tar it with the command tar xvzf moodledata.tgz, issued from a ssh session.  Then I move this to my "public_html" area with the following command "mv -i moodle ../public_html/moodle04".

5) Then I start moodle (moodle04) in my browser, the install proceeds, then you have to make sure to use the correct database and moodledata in the dialog boxes.

6) This is really step 0, I check that my server meets all of the requirements for moodle with  the following a webpage called info.php that contains the line "<? phpinfo(); ?>".  I check for the presence of zip, xmlrpc, soap, mysql improved, mbstring, intl, and gd.  I also check my versions of php and mysql.

Well, maybe some of this will help you.  But if you cannot get a fresh copy of moodle working, you will not likely get your "moved" copy of moodle working either.


Oh, here is one more step.  When you do get your fresh copy of moodle working, then try moving your previous moodledata into your new copy, and your database into your new copy.

In reply to Athena Divine

Re: Moved Installation

by Ken Task -
Picture of Particularly helpful Moodlers

First, please try to understand that using different browsers pointed to a broken site ALL will report the same thing ... the error 500 misconfigured site.   This to suggest, no reason to show screen shots of different browser screens.  We need to focus our attention on the web site.

Let's turn back the clock here ...

This all began when wanting to move a moodle from
akkadianaturaegrove.com/education to
themagicakalgroveacademy.net

Note the word 'move' ... that involves a greater understanding of web hosting as designed for customers by the hosting provider.

With Moodle, everything *must match*.
The code configured with akkadianaturaegrove.com
must use a DB for that site and the moodledata directory
was built using that domain.

themagicakalgroveacademy.net Doesn't exist in DNS

IS that really the intended domain of the site desired?  or is it an example?

Are your sites hosted here?
http://hosting.goddessdivinedesigns.com/index.php

goddessdivinedesigns.com
Appears to be where your sites are hosted.
They offer One Click Installs with very cheap hosting.

Was your /education/ moodle installed using a "One Click" installer?

IF so, those are provided by your hosting provider.   Moodle code, downloaded from Moodle, doesn't include any such thing ... no one click installer comes with the code.   And you get only the code which does include an install.php script but the installer must do some things to make it work.

I'll bet there aren't many folks active in these forums who host with your hosting provider.  While hosting providers do similar things, they are not ALL the same.

What version of Moodle does that one click installer install for you?

Let's stop here ... things are confusing enough without overload.

So let's review what you've been asked:

Are your sites hosted here?
http://hosting.goddessdivinedesigns.com/index.php

Does hosting provider offer a one click install for Moodle and is that how /education/ was installed?

What version of Moodle does that one click installer install for you?

'spirit of sharing', Ken


In reply to Ken Task

Re: Moved Installation

by Athena Divine -

I am Goddess Divine Designs, so not sure where to go from there.  I do have quick install but it only gives me 2.5 and that's just insane.  I have VPS so I had to have my upline provider fix it so I could even use the quick install.

So, I'm determined to move the site, as is with all the graphics and with all the information intact from http://akkadianaturaegrove.com/education to http://themagickalgroveacademy.net 


I've worked hard and long on the first one and really personalized it for the purposes.  I really need to do it this way.  So, if anyone could help me, I've decided to stop doing anything on the first site and get the mirror image working on the second site.

This is what I've done so far:

I first exported the database from the first site, made a new one for the second site and imported the sql to the new database.  

Using ftp, downloaded all the files as is in the first site, uploaded the exactly the way they were, changed the config to point to the new database.

This is what I changed it to:


Can anyone help me figure out what I'm doing wrong?  I even tried to run the /install.php and that didn't work either.

In reply to Athena Divine

Re: Moved Installation

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

'Using ftp, downloaded all the files as is in the first site, uploaded the exactly the way they were, changed the config to point to the new database.'

Just for clarity - can you confirm you have moved the moodledata folder as well as the code folder? I'm assuming you have given the CFG->dataroot in your config.php, but you dont mention it in your description of what you did.

In reply to Athena Divine

Re: Moved Installation

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Have you checked permissions on the migrated files?

Is your domain name correctly pointed to your Moodle folder?

In reply to Athena Divine

Re: Moved Installation

by Bret Miller -
Picture of Particularly helpful Moodlers

This might seem obvious to those of us who do this regularly, but it's worth asking. When you say you "downloaded all the files as is in the first site" did you include both the files in the web site folder AND the files in the "dataroot". Moodle requires both. Without both, you'll have lots of problems.

Also, Moodle needs to write to the "dataroot" so once you upload there, the permissions need to be set to 777 unless you're running FastCGI under your own user so it can write to the directory.

In reply to Bret Miller

Re: Moved Installation

by Athena Divine -

Where do I find the dataroot?