3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -
Number of replies: 65

Hi guys


Firstly excellent work to those that have contributed to this incredible software.

I have an issue upgrading from cpanel within godaddy, this is from 3.1.2 to 3.1.3, i get the following error:-



Please forgive me, i am new to this so dummies guide please.  I have changed my 5.4 php version to 5.6 on my host.  Can anyone explain what has happened here and how to overcome it so i can upgrade?

I understand that manually upgrading is probably an option but my knowledge wouldn't let me get that far i dont think.

Any help would be much appreciated

Thanks guys

Andy

Average of ratings: -
In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Andy, first, is your moodle working?

Second, yes, what you are seeing is the results of using a third-party upgrade product.  What this means is "who knows what it did?" Godaddy won't help you (it's not their upgrader product) and the third-party upgrader company won't help you (you figure it out!)

Many years ago I was in your same situation.  The very short answer is to take time to learn how to upgrade manually.  It really isn't that hard.  But yes, it takes some time and learning.  You will benefit by learning about about FTP and SSH.  How many plugins have you added to your moodle, if any?


Average of ratings: Useful (1)
In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

Many thanks for your response, i suppose the only thing i was worried about is that i have abit of customisation within the site.  Question if you dont mind, if i ftp the latest moodle files will this overwrite my custom changes? or do i only upload certain files? Of course i will read up on how to do this and see how it goes.

I think the best thing is to do is clone the site under a sub domain then play with it.

Thanks again

Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Andy, there is no need to clone the site as a subdomain, although one can.  What you can do is install another copy of Moodle for experimenting in the main domain.  The concept is as follows:

1) Create a new database, call it something like moodle3exp.

2) Create a new moodledata folder, call it something like moodledata3exp.

3) Install a new copy of moodle into its own folder, call it something like /moodle3exp.

Do the install.  With time, clone you production moodle data.

When you make it through all of this, you will have learned a lot.

I made this video to show how I do some of this on one of my Godaddy hosted servers.  It is the first link on this one webpage of mine.

Yes, be careful over writing custom files.  The answer to this question depends upon what kind of customization you have done.  For example, if you customize a theme using the themes custom CSS textbox, you are fine.  But if you have changed code, you need to think about the update.  Also, be careful preserving your config.php file.  This is a very important file.

Average of ratings: Useful (2)
In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

Absolutely fantastic video tutorial, works like a charm. I followed it through to the end and yes not too bad after all.  Once you have successfully got to the last page how do you transfer the contents, theme, users etc from the other main moodle site? I assume backup each course and restore onto new site but what about users and theme plugins quiz etc? basically the whole content of the existing site?

Is there an easy way to do this?

Also i would like to say your help is much appreciated and thanks for helping.

Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Andy, glad that my video is helping.

For moving your old moodle to your new one, you need to watch my "migration" video, which I haven't produced yet.  sad

Well, the key word is "migration."  I can describe the basic steps.

1) Move your old moodledata folder to your new moodledata folder location.  Overwrite everything.

2) Backup your old mySQL database, restore it to your new database.

3) Reinstall any extra plugins to you new moodle that were in your old.

4) Copy theme settings manually over to the new.

This is all easily said, and really not that hard to do, but it takes a lot of care.

You can always try installing theme settings into your new moodle, and your plugins, even without the old data.  Just to get the hang of it.

Well, how soon to you need my migration video?

You will also someday need my "upgrade" moodle video, too.  Right?

Average of ratings: Useful (1)
In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Just H -

If you really want to follow this methodology; for "4)" I'd have a look at the Admin Presets plugin to save some time.

Average of ratings: Useful (1)
In reply to Just H

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Maybe so.  But for the one time that this action is needed (i.e., the migration) I am not sure if I would want to install another plugin for a one-time need.  But I have never tried the Admin Presets plugin.

Average of ratings: Useful (1)
In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

Once again, many thanks for your help. OK I've got to grips of installing from fresh as per video which is really good to follow.  However as a test i have tried to restore a course from a backup onto the new moodle 312 which is on a different domain.  It wont let me do it saying its too large (14mb), i have checked the menus in admin of the new 312 but cannot see where to increase the limit.

Also i feel that i will have to wait for the migration video as i find it a lot easier to see how its done as my knowledge is very basic.  So would be very grateful if you can let me know when this becomes available. 

The current stage i am at now, thanks to your video is i have a clean copy of moodle 312 on my domain and now not sure how to shift all my settings (theme) and users/courses etc over.

Thanks buddy i really appreciate you taking the time to help.

Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

File upload size is set in your php.ini file.  Look for post_max_size and file_upload_size - increase both settings to the max file size you want.  Depending on your host setup, if you can, restart webserver after changes.

Average of ratings: Useful (1)
In reply to Emma Richardson

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

The two settings that Emma provides is what you need to focus on, Andy.  If you go into your Moodle 3.2, Administration | Server | PHP Info, you can see what these two settings currently are at on your server.  My guess (and Emma's too) is that your values are too low and need to be adjusted upwards.

I don't think cPanel provides this ability, so you will need to edit your php.ini file.  You can find the path to your php.ini file by looking at the output of your PHP Info from above, it is show in "Loaded Configuration File."

Now the $100US question, can you edit this file?  Typically, you have to have superuser rights to do so.  I edit mine by first logging into my server via SSH, then I go into the folder where php.ini is locations.  First, copy what is there to a backup (as in "cp php.ini php.org"), then edit the file, then reboot the server.

I am not sure how far you can get with these steps by yourself.  I am not sure if Godaddy will make the edits for you either.  As I recall, you have a hosted server and not a VPS, right?

Let me know where you end up.  There is another way back-door way to do this.

Average of ratings: Useful (1)
In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Emma & Rick

OMG not got much hair left.  Ok i have navigated to admin >server>phpinfo and can see that upload file size is set to 2M,  A bit out of my depth but i have tried created a php5.ini file with the relevant code, then went into php processes and killed all processes and then refreshed the change but still remains at 2M when i run phpinfo.php which i created. When i run that info file it says 2M.  I did clear my cache in my browser just in case but still refresh didn't adjust.

Any idea's on what im doing wrong?  Yes, i'm on a shared hosting plan with GoDaddy


Thanks again

Andy


In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Also just checked php in cpanel and is showing:

upload_max_filesizeMaximum allowed size for uploaded files.32M

Thanks Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

So cpanel is correct but moodle is not...is the php.ini file you created in the moodle folder?

Average of ratings: Useful (1)
In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Andy,

See my second video on my Moodle Notes webpage.

Average of ratings: Useful (1)
In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

Had a little go this evening but to no avail, im off work next week so i will have more time to play around with this.  However i do have a mac book pro and brought the terminal window up typed the ssh then url and then i got something come up about fingerprint etc, i confirmed i wanted to continue to connect but kept getting denied access. 

Do i need to have this SSH installed or editor etc? or is it already built in to the mac? Im running OSX Yosemite 10.10.5.

Also had a chat with godaddy support on live chat for an hour last night and they guided me to the following:-

From Cpanel click "Select PHP version" then switch to PHP options and then on that screen you can adjust the uploads to a max of 128mb as shown on the attached screenshot, does this mean i still have to follow your instructions?

As a result of this change i have attempted to restore my course as follows:-

In Moodle

Site Administration > Courses > Restore Course

Then i dragged the 14mb file onto the space provided to restore the backup which resulted in the following error:-

"The file you tried to upload is too large for the server to process."

Thanks buddy, your help is much appreciated.

Andy


Attachment Capture.PNG
In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Oh its working, just successfully uploaded the course. The godaddy php options adjustment has worked it seems. so now thats done i have forgotten where i was going with this now lol.

Thats it points 1-4 in your original post.  I will have a go and see what happens and let you know how i get on.  Rick i must say i really appreciate your patience and help.  Also many thanks to Emma for jumping in to help to its much appreciated.

Andy



In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Okay Andy, you are making progress.

The Mac Terminal app is fine, it's your GoDaddy.  You have to enable SSH from cPanel.  You also must login to your goDaddy server correctly.  Yes, the first time you might be asked to "accept" or something like that.

You might also still need to adjust post_max_size.


In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick


Firstly i hope you had a good christmas, im now finding the time to play and follow your steps above.  So far i have installed the lastest moodle 3.2+ with the new database and all ok so far. I have now copied the contents of the moodledata into the new moodledata folder in root.

I am now on step 2, this is what i have done so far.  I have backup up my existing mysql database and downloaded it to my desktop, this was via phpmyadmin > Select the database on the left hand side > then export as sql. I have now clicked on the new database on the left which i created when installing the new moodle 3.2+ and then went to import and uploaded the downloaded file.  This is now showing a different size so i can only assume it has worked as it did tell me that it imported successfully.

However when i go to my site and check the list of users there is only admin. Forgive me as im new to this but i assumed the users would be contained in the database? I have cleared my browser cache and refreshed but still no users.

I did, when backed up and downloaded my existing database, rename this on my desktop before uploading as i thought it may effect my existing db some how. 

Apart from that im not sure what i have done wrong, if any.

Once again many thanks

Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

It is always hard to figure out exactly where someone is in their installation, but let me try.  This is all part of troubleshooting.

Are both your "new" and "old" moodles still working?

For your new moodle, if you look at its config.php file, is the dataroot pointing to your new, and correct, moodledata folder?

Out of curiosity, what are the names of your old and new moodledata folders?

For your new moodle 3.2 database, you could try going into phpMyAdmin from cPanel, and look at the mdl_users table to see if it contains your many users, or just the one.  This is one way to verify that the import worked.  Sometimes phpmyadmin imports don't work, and you might not get the right message telling you the import failed.

The database and the moodledata folder must always work together.  They are a matched pair.  If one is wrong, you can encounter the kind of problem that you are encountering.  Either your database does not have all of the previous users, or your moodledata folder is not correct.


In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick


I have followed the steps as above and have started from fresh 2/3 times but users will not come across when importing from mysql backup.  I have tried looking at the mdl_users in phpmyadmin but for some strange reason, when i search it doesn't show in my existing database which is working ok with 62 users.  The original site which this DB is running is working ok under moodle 3.1.


When i search under the new database then i can see the mdl_users which contains admin and guest user only. I have checked my config file and is correctly pointing to my moodledata32 folder in root directory. 


Can i just backup the users via moodle admin as csv file and import as a work around?


Also in case this has something to do with it, the moodledata folder in my moodle 3.1 is not labelled up as that, i assume that this is the "Data" folder. I have copied the contents of the "Data" folder to the new moodledata32 in my root directory.


Thanks buddy

Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Andy, if you do not see your old database in phpMyAdmin, then what did you use to make your backup file which you then tried to import into your new Moodle?  Your old moodle must have a database on your server.  Maybe you do not recognize its name.  Might you share a screenshot of what you see in phpMyAdmin?

Also, if you cannot find your old moodledata folder, again, what did you copy into the new location?

If you cannot find your two databases and two moodledata folders, then you might have clobbered one along the way.  

So when you go into your old moodle, everything looks fine?  If so, all is not lost.  Your old moodle must have a database and a moodledata folder somewhere.  Again, the database must show in phpMyAdmin.  Maybe your moodledata folder is within your "moodle" application folder.  Sometimes one-click installs do this.

I am also guessing that not only do you not have users in your new Moodle 3.2, you probably don't have courses either.  Or did all of your courses import?

In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

Apologies for not making it clear, hopefully this will help.

Here is a screenshot of my phpmyadmin:


My ashuk38_mood2 is the database for my working site and all seems to be working fine.  When i search for mdl_users it doesnt find it, screenshot below:-


However when i search under new database (ashuk38m32) it shows, screenshot below:-



My structure of folders are as follows:-


New moodledata32 folder is in root;-



Structure of old moodle site. However i should of put this into its own folder, lesson learnt now. however the moodledata folder is named as, i assume "data". 



The contents of this data folder is:



Apologies for not being clear enough, hopefully this helps understand whats happening. Just to confirm the old moodle 3.1 is working fine and users can login as normal.  I have copied the contents of this data folder to moodledata32 in root but doesnt make any difference.

Also i have noticed the size of mysql database is now 97mb but not sure how as my working database (ashuk38_mood2) is only 61.31mb.



Just to clarify my new moodle site is in its own folder within public_html not in the root of public_html as old site

Thanks again for your patience.

Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Andy, it appears that your import of the old data into your new database did not work.

Since your new moodle can be recreated (it is somewhat experimental, here is something you can try.  (Don't do this on your old database.)

Go into phpMyAdmin, your new database, select all the tables and "drop" them.  It will take two steps because of the many tables that moodle create.  This will leave you with a "shell" so to speak.  Then do the import and see if all of your tables get recreated.  Using phpMyAdmin is not as reliable as using ssh, in my experience.

How big is your moodle database file?

You current installation is one where your old moodle is installed in the root of public_html.  This is not odd, but it does make it a little more difficult to do these new installs, mostly the issue of upgrading your old.

In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

Tried but to no avail, however it seems that between the 2 versions of moodle the tables are labelled differently, hence why i had trouble finding it.


In 3.1 version its labelled as mood_user (this contains my 62 users) and working fine.

In 3.2 version its labelled as mdl_user (this contains 2 users for example admin and guest as part of setup).


Burning question is how do i get the users in mood_user to mdl_user in the new database?  


I have tried the same theory by attempting to export mood_user and downloaded, i then attempted to import this into mdl_user but i get this message:-



Due to this error, it didn't change nothing as the only option i had was to click "back"


Slowly getting there and thanks

Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Just thinking if i delete the table from the new site and then rename the old working table, do you think that would work?


Thats probably why my database has increased maybe? ie doubling up on mdl and mood tables?

Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Andy, I seldom do anything at the "table" level of moodle, so I don't know if your approach will work.  If the users exist in the old moodle, and they are not in the new moodle, then your database import didn't work.

For me to help you, you will need to have SSH access.  I have found that issuing SSH database commands for backup and restore (i.e., migration) is the only reliable way to migrate my moodle installations.

Here is and overview how it works:

1) Backup your old moodle moodledata folder

tar cvfz moodledata.tgz moodledata-old/

2) Backup your old moodle database.

mysqldump -uusername -ppassword --opt -rmoodledb-old.sql moodle-db

3) Move and Restore your old moodledata into the new location.

tar xvzf moodledata-old.tgz

4) Restore your old moodle database into the new moodle database.

mysql -uusername -ppassword moodle-db-new <moodledb-old.sql

This is an overview of the process.  There are a few more things to do, but you would have to feel comfortable with the above steps to have success.  You also need to have your new moodle working before doing the above steps.

In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

Many thanks for your help once again, ok ive tried many options including yours above. Im completely out of my depth but am trying desperately to learn. I have tried the following:-

mysqldump -u myusername -pMyPassword --opt -rashuk38_mood2.sql moodle-db

After pressing enter i get:

Got error 1045: Access denied for user @ localhost (using password YES) when trying to connect.  

I have double checked the password etc in config.php so everything is fine.  I have tried researching on the web and others seem to have this issue and could be that there are 2 versions of php running.  Im now on 5.6 but the old moodle site was 5.5, not sure if this has something to do with it.

I have also tried:-

mysqldump -u -p ashuk38_mood2 > backup1.sql

Still same error.

just trying to understand the command for my benefit what does --opt -r mean? Im assuming that the "moodle-db" is representing the name of the backup file? 

Thanks again and sorry to be a pain.

Andy



In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

Ignore my last post, it is working. Mistake on my part, i have backed up successfully and restored and even though i get the following message it seems to have done something. I now get "Error reading database" when i try to load my new moodle site.

The steps i done is that i followed the installed by creating a new database and installed moodle by using the wizard. When i got to the admin stage of inside moodle i then done the steps above.

Thanks Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

The 2 commands i have used is:-

Backup old moodle database

mysqldump -u ashuk38_mood2 -p************ ashuk38_mood2 > backup.sql


Restore into new moodle database

mysql -u ashuk38m32 -p************ ashuk38_mood2 < backup.sql

This works fine using SSH and when refreshing filemanager in godaddy i do see the backup.sql in root. However when i refresh page on website i get error reading database.

Thanks Andy


In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

I looked more closely at your above post.  It appears that you first backup your database, but then you are restoring it into the same database, ashuk38_mood2.  Your new moodle database name should be "your new database."  (i.e., Two databases are involved in your migration, the old and the new.)

Also, I thought that there should not be a space between "-u" and your username.  But if your command is working, well, fine.  (I would have done "-uashuk38m32" for example.

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

So, from your posts, you seem to still have problems "error reading database."  Have you verified that the mdl_user table now has 65 (?) users, meaning that your import worked?

Have you coordinated your new moodle database (restored from old) with your new moodle "moodledata" folder (restored from old)?  Have you looked at your config.php file (in your new moodle folder) to see if the settings are correct?  If, for example, you have a new database but your config.php file points to the old, things won't work.

I still need to make my "migration" video.  As you are seeing, everything has to be perfect for moodle to work (perfectly).  For example, your commands to backup your old database were wrong.  Then, you got it right.  Wow.

It appears that you now have SSH access, right?

In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

Yes my mdl_users and mood_users are showing the list of users in the new database.  Bit confused over the prefix's though. Yes i see where i have gone wrong above so i will attempt it again.  What i will do as i have played with this so much and could of damaged it, i will start from scratch.  These are the steps i will take, correct me please if im wrong:

1. I will delete the new database (ashuk38m32) from mysql database in cpanel.

2. I will delete the folder containing moodle 3.2

3. i will leave the moodledata32 in root with the existing files as this shouldn't effect anything and has the correct permissions (777)

4 Create new database and use existing database user in cpanel

5. associate the new user with the database (user has all privileges)

5.5 adjust to uft8 as shown in your video and click go

6. extract the new moodle 3.2 into the chosen location folder in public_html

7. Install through the URL (install.php) (WHEN DATABASE SCREEN SHOWS WHAT PREFIX DO I USE?) in your video you leave it default.

8. setup admin account for moodle 3.2 as part of setup.

9. Once in moodle as admin, logout

10. then access SSH and backup the old moodle 3.1 database

11. Restore the backup by using the correct command.

12. check user table to ensure import has worked and config points to the correct place.

Then hopefully this would be success.  If this doesn't work, i think i would have to wait for your migration video as watching it being done would cement in the knowledge. 


Thanks buddy

Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

I have never known the prefixes to have any ill effects.  They are just "container" names and are not referenced "absolutely" anywhere that I know of in moodle.

In your steps (and in your system), I am not clear about "moodledata."  Do you have two moodledatas, one for your old and one for your new?  I think that your new one is moodledata32.  Does it contain anything yet?  When one installs moodle from scratch, it is probably good practice to start your moodledata folder with nothing in it.  Then, when you "migrate" your old to your new, you move your old database contents into your new database, and your old moodledata contents into your new moodledata  folder.

Remember that the moodle database is "married" to the moodledata folder, they always travel as a pair.

In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

Cant seem to get your command to work: 


3) Move and Restore your old moodledata into the new location.

tar xvzf moodledata-old.tgz

I replaced the "moodledata-old" with "data.tgz" as this is what the backup created in public_html 

I get the following message:-



Currently the backup worked and saved the file 629mb into a file that i called data.tgz in public_html. 

The command used for backup was tar cvfz data.tgz data/

Can you clarify what the exact command is for restore in SSH?

Almost there

Thanks Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

What command did you use to create data.tgz?

Post what you get when you do the following: "ls -al d*"  (list files that begin with d)

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

I was in the middle of re-editing my post to you and exceeded the 30 minutes.

Notice the error on your first line "Cannot open: No such file or directory"   So does your file really exist where you are trying to extract it?

A video might help, but right now I am busy prepping for courses that I will be teaching shortly, so time is limited.

In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

Really sorry for all the questions and grateful for the help. I have started from scratch again and after a fresh install of moodle i have used the command for backing up the data folder as follows:

tar cvfz data2.tgz data/

This successful backed up and now sits in my public_html as data2.tgz

Screenshot shows backup file below:


my structure is as follows:-


What exact command do i need to restore into moodledata32 folder in root based on the structure above?

i have tried:

tar xvzf data2.tgz /home/ashuk38/moodledata32 

Just not sure what the exact command is to restore.

Thanks buddy

Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Okay, data2 and not data.

Why not move data2.tgz up one level to your root (/home/ashuk38) and then extract it from there.  This is where your new moodledata fold is, isn't it?

Now be careful.  When you extract data2.tgz it will probably create a folder called data, or whatever the name of the folder was when you tar'd your moodledata folder, probably data.  Do you have a folder called "data" at your root level?  If not, you are find.  If so, do you want to overwrite its contents... probably not.

If your new moodledata folder is called "moodledata" and if data2.tgz extracts as "data" the here is what I would do (from /home/ashuk38).

rm -rf moodledata (removes current moodledata folder)

mv data moodledata (renames data to moodledata)

chmod -777 -R moodledata. (recursively fixes ownership)

If you folder structure is different that what I am assuming, of course these steps typed literally won't work.  You will have to make adjustments.

I forget where you are with you new moodle database?  Are all 26 users in it?


In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

Yes all seemed to have worked with no error outputs in ssh.  Logged in to new site but only showing users of admin and guest.

I checked in phpmyadmin in cpanel and there are 2 tables in my new database:

mdl_user (which contains the admin and guest account only)

mood_user (which contains my 65 users)

It looks like moodle is looking at the mdl_user table rather than the mood_user table.  Not sure how to rectify this.

Thanks again

Andy


OK just editing this post again:

Even though the restore worked on the moodledata folder in root and files are there by looking in cpanel, there is nothing in the new moodle site to show the import has worked.. Ok i seem to be losing the will to resolve this and feel guilty by taking up alot of your time when i appreciate you have your students etc to concentrate on. I think i will have to wait for the migration video later on.

I would like to thank you for your efforts and time on this and must say i have learnt alot in the process so many thanks for all your help.  If you can let me know when the video is available that would be great and i'll have another attempt.

Thanks Rick, you have been great

Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Andy, I am not sure what your time schedule is (such as "my moodle must be working tomorrow" but if you have some time, I am working on the extra videos. Right now my fast Internet provider is "down" so I can't upload a 200MB video effectively.  But I am close to doing so.  Maybe by this weekend (I always hate to over promise.)

From everything that you have said, I believe that your database commands might be missing something.  When you import a database, the new database contents should match you old Exactly!

Okay.  Take a break and relax a little. You have learned a lot.  

P.S. Take a look at this discussion as you learn about databases and moodle.  It illustrates the concept of having two different Moodles. You will need to make sure that you have accurate database and moodledata names for your migration.

In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

Many thanks, i think whats throwing me is that i have 2 tables, mood_user and mdl_user. im still running on my old site so not so critical at the moment, but many thanks for doing the video. I think watching it done would be easier and hopefully i can see where i'm going wrong.

In relation to the link, i had already read this as I've searched alot of posts, youtube videos etc but as my knowledge is not that great especially when it comes to databases.

Look forward to the video and many thanks for all your help.

Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Andy, before I do a database "import" I "drop" (delete) all of the tables.  This avoids possible duplicate tables and weird tables.  Also, by first dropping, you will then know if your import really worked because you will then see all of the tables.

I somehow believe that your import is not working.

I added two more videos to my Moodle Notes webpage.  But the last video is probably the one that you need because it will show you the final "migration."

(I never mess around with individual tables.)

In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by A Roy -

Hi Rick,

Thanks for your tutorial videos. These are really helpful for me. 

There are 3 video link in the top of the page.  The 2nd and 3rd videos-

(2nd) : A video showing how Rick prepares for Moodle "migration" on a Godaddy hosted server. A good share of this video shows how to upgrade your new Moodle as you prepare it for the migration. 

3rd: A video showing how I actually upgrade my production Moodle (a recommended step for migration.

Are these two tutorials same?




In reply to A Roy

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Thanks for your post.  I had the wrong URL for the second video.  Now fixed.

In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by A Roy -

Hi Rick,

Thanks for your stepwise tutorial for moodle installation. 

I am new in moodle installation. Your first video helps me to successfully install moodle 3.2 on godaddy hosting. It is running fine on desktop.

When I try to connect my site on iphone moodle app, it it not connecting. (msg: Ooops! We are having trouble connecting to your site..). I am using this app to connect other moodle sites (e.g. learn.moodle.net), which working fine.  Is there any additional setting required in cPannel to work version 3.2 or ios app is not suitable for 3.2?

Regards,

In reply to A Roy

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Have you set up mobile access in Moodle?

https://docs.moodle.org/32/en/Moodle_Mobile_guide_for_admins

 

In reply to Emma Richardson

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by A Roy -

Hi Emma,

I did changes as per docs. It is working fine in my ios app.

Thanks

In reply to A Roy

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

I assume that you can connect to your moodle by using the browser on your iPhone, right?  The beauty of the default Moodle Themes is that they are "responsive," meaning that you don't need to pinch to zoom in.  I prefer the browser over the Moodle App, but that's just me.

In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

Oh no, dire straits here. I got to the screen where it checks the environment where it say ok but when it goes to plugins i click on the upgrade moodle database button and then i get this:-

Debug info: Table 'mood_tool_usertours_tours' already exists
CREATE TABLE mood_tool_usertours_tours (
id BIGINT(10) NOT NULL auto_increment,
name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
pathmatch VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
enabled TINYINT(1) NOT NULL DEFAULT 0,
sortorder BIGINT(10) NOT NULL DEFAULT 0,
configdata LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
CONSTRAINT PRIMARY KEY (id)
)
ENGINE = InnoDB
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE = utf8_general_ci
COMMENT='List of tours'
;
CREATE TABLE mood_tool_usertours_steps (
id BIGINT(10) NOT NULL auto_increment,
tourid BIGINT(10) NOT NULL,
title LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
content LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
targettype TINYINT(2) NOT NULL,
targetvalue LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
sortorder BIGINT(10) NOT NULL DEFAULT 0,
configdata LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
CONSTRAINT PRIMARY KEY (id)
, KEY mood_tooluserstep_tousor2_ix (tourid, sortorder)
, KEY mood_tooluserstep_tou2_ix (tourid)
)
ENGINE = InnoDB
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE = utf8_general_ci
COMMENT='Steps in an tour'
Error code: ddlexecuteerror
× Stack trace:
  • line 485 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
  • line 919 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 77 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
  • line 425 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
  • line 370 of /lib/ddl/database_manager.php: call to database_manager->install_from_xmldb_structure()
  • line 520 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file()
  • line 1748 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 693 of /admin/index.php: call to upgrade_noncore()
Not sure whats happened but it keeps looping back to this error.


Thanks Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

Oh no having trouble recovering, ive tried to revert back to the renamed folder which is fine but when someone attempts to log in i get a "Dangerous" browsing message saying

Attackers may trick you into doing something dangerous like installing software or revealing your personal information. Google safe browsing detected phishing.

Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

OK to add to my last post, i have restored the backup from cpanel into a different folder and adjusted the config file which has now got me out of the mess. The old moodle site 3.1 is now functioning again.

In a nutshell whilst following the video, i took the following steps.

firstly in order to follow the video with ease i re-structured my moodle site out of the root of public_html into its own folder so i could see what i was doing, my structure now looks like this in my public_html folder:-


In moodletmp folder i was preparing my moodle as per video, adding the plugins into the relevant folders and copying the config-dist and config.php files from the exisiting production site into this folder.  I then renamed the existing m31 production site to m31x and then moved my new m31 from moodletmp into the above.  I double checked the config and everything was pointing at the existing production site database and moodledata folder in root.

I then refreshed the url and i got the upgrade message, i clicked continue and then logged in as admin and was automatically taken to the plugins page, i scrolled to the bottom and clicked on upgrade moodle database and then saw the error message above, all i could do was click to continue which took me back to the plugins page and kept going round in a loop.

I then reverted back to moving m31 back to moodletmp and renamed m31x back to m31 which was fine until google safe browsing told me my site was dangerously unsafe and warned me that my site could be phishing. obviously i was changing the config file to keep up with the changes that i was making.

I then renamed back to m31x and then went to cpanel > installtron to restore my backup from there as a quick fix, i restored into m312 and adjusted config again and site is now working.

The main problem with the upgrade is that i was stuck in a loop with that error above, not sure if i missed anything but i will watch both videos again today to see if i missed anything. If you can shed any light on why i got the plugin error loop problem that would be great.

Many thanks once again

Andy



In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

It might help to post your config.php file, less the database user password.  This will tell us what your database name is, where moodledata is, and maybe a few more things.  Also post your config.php file (less password) for your working moodle.

It appears that your moodletmp is in your public_html folder.  If so, consider moving it up one level (out of public_html).


In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

I think its a plugin causing the issue, as i have tried it again and getting blank screen. What i have done now is stripped everything back and deleted all the experimental moodle databases etc. I only have my working site in /public_html along with my moodledata folder in root and my associated database and all working.

I will attempt to follow through on the video again, but wondered if i could somehow skip the plugin stage and then install them after from admin in moodle. Is that possible or will it mess up the migration/upgrade?

If i still have an issue after i attempt it again, would it be possible for you to login and check what i have done via delegated access into my cpanel?  Obviously i dont want you to do it for me as i need to learn going forward, just thought it might be easier to check rather than trying to explain through posts.

Thanks buddy

Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Rick

Ok, i have tried so many ways, done alot of reading and followed your video twice which is really good and many thanks for that as i have learnt alot.  However i am convinced its to do with plugins. I get as far as production site detecting the new upgrade and then i click continue, all checks on environment are all ok but when i get to plugin overview page it just goes round and round reporting addons missing etc and cant therefore move on.

I noticed on your video that you only had 3 so thats probably why you were ok, i have 17.  Also user_tours keeps throwing up errors as well saying it already exists, but it doesnt as this was a new feature in 3.2.

I think the only way round this is to install a fresh working copy and import courses via admin and redo my theme, logo etc, also exporting csv file of my users.  I am however concerned about loading plugins in case when i come to upgrade in the future i have the same problems. However the guys involved developing moodle have done a fantastic job so kind of hoping that migration/upgrading would be easier going forward.

As a test i will install a fresh copy of 3.1 with no plugins and upgrade it as it stands to 3.2 and see if it works. If it does then my theory of plugins is looking correct.  I see alot of people talking about it on moodle forums whereby stuck in a plugin loop and to try and recitfy it within tables in the database etc, but way over my head.

However your video is really good and thank you for all of your time, its much appreciated. 

Thanks buddy

Andy

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Just because plugins are missing does not necessarily mean you are stuck.  You should still be able to move on.  If you try again, make sure to restore the database from before the upgrade attempt.  That will probably help you avoid the already exists errors though there was a plugin for user tours before it was incorporated into core - are you sure you didn't install it?

I would try it one more time before going the other route.  What I do when I update is pull up my plugins overview page, filter to additional, then before I run the upgrade, I make sure I have copied over all the plugin folders to the new moodle code.  

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Andy,

I sympathize as I have run into the same plugin missing problem in the past. On more than one occasion when I've gotten to that plugin page, I have used sftp to add in the code/folders for each of the missing plugins, hit the reload button in Moodle, and kept doing it until all of them were okay. Better than starting over. The number of plugins, 3 or 17, should not matter. I currently have 107 and the last time I had to "manually" add them in it was somewhere around 90 and I had to play with about 15 of them.

Hope this helps.

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Andy, I have seen posts here on Moodle.org about migrating and plug-in issues. As Emma and Al point out (in theory) you should be fine.  (Al, wow, quite a few plugins!)

So I am just brainstorming a little.

If you don't have too many courses or too many students, you might consider trying a fresh (new) install of moodle, backup your old courses, then import them.  You should also be able to import your old students.

I am still concerned that when you import your old database into the new database that you do not see your old students.  This suggests to me that something is still wrong with your import routine.

In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Andy Hill -

Hi Guys

Many thanks for your responses. Ok due to peace of mind ive had to install a fresh copy separate to my production moodle as i cant guarantee if it has been damaged due to all the experimental actions.  Once i switch over to this to make it my main production site i will delete the old one, but will leave it there for now in case i have missed something. 

Once all this is done i will backup up the following:-

Moodledata folder in root
Moodle installation folder
Sql database
Config.php

Obviously at some point in the future i will have to attempt this again when a new update comes out.  Can someone remind me what the command is again for importing the database into the new sql database?  Is the command:-

mysql -u******* -p mysqlbackup.sql < newdb

Guys, would like to say many thanks for your time, especially yours rick for all your patience.  

Thanks 

Andy  

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Andy, when you eventually get your new moodle up and running, and then you want to "delete" the old, consider installing the AMP local computer system, and move your old moodle to it (yes, migrate your old moodle to your AMP/MAMP/XAMP local PC server.)  This way if you ever find yourself needing data from your old, you will have it.

Also, no need to delete it from your server either.  Just migrate it into a different location and don't tell your users, or disable its login.

Just today I had to reference a course from Fall09.  I have Moodle 1.9 on my Mac in MAMP.  I just opened it up and got to the information.

If your old moodle happens to be big, like 50TB, then you will have to rethink your strategy.  My Moodles are rather small, under 5GB.  So I have a copy of my moodle before switching to moodle2.0 (I call this moodle19), and another copy before I switched to moodle3.0 (I call this moodle29) on my local computer.

Just make sure that you are backing up your local computer.  (We Mac users have TimeMachine provided to us by Apple for backup.  Works great!)

In reply to Andy Hill

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by pst tomowo George -

Following this trend BLESSED me a lot... 


Thanks Rick for the great efforts... I ve learnt a lot..

Was in the same issue with Andy... however I did something... I think it's not a BEST PRACTICE... so I may have to address that at some point:


This is what I did:


1. After upgrading to Moodle 3.2... it worked however I had only Admin and guest ... No users, no courses ... 

(Guess migration did not work for me...)


2. I went to my confg. File and discovered it was pointing to mdl database .... so I changed the pointing to MOOLE.  instead of MDL...

And that solved the problem...


All my users were restored and the courses...


3. However, I guess I might still have to address this at some point. That means I am using Moodle3.2 on my old database (MOODL)


4. Meanwhile, DID I TELL YOU THAT I AM A NEWBIE... indeed very new... willing to learn...

Hope to gain from y'all wealth of experiences...


Once again ... thanks a bundle Ricks for your videos... I am learning a lot from them...


5. Meanwhile, if you know what I will do to get back to the Mdl database... pls show me... because many things are not yet working like my emails.. 


I am a lady, a pharmacist, an online pastor,  an online coach so no much background with IT programming... I am willing to learn though...


You can pls take a look at my site and see what to add.  http://coaching.air.church


Thanks a billion Rick.

GOD BLESS YOU AND ALL THE TEAM... 


thanks also Andy ... this trend has helped me a lot...


pst tomowo

In reply to pst tomowo George

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

Great job!

So let's see, your Moodle 3.2 is working fine and has all the users in it from before.  Are all the courses there, too?  Does it look fine?

It could be that you are in fine shape.  Maybe somewhere in your upgrading of Moodle the database was upgraded.  This is normal behavior whenever one upgrades... if the database needs upgrading, moodle will do this.

So if your moodle 3.2 is working fine, just make note of which database it sees itself connected to in your config.php file.  You will need to be aware of this for future upgrades.

In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by pst tomowo George -

Thanks for the prompt response....

YES... all the courses are in because the confg. file is pointing to the old database MOODL...


Can't figure out though what went wrong with my SMTP set up.... I can't send mails... and receive mail...


Thanks...

In reply to pst tomowo George

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

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

You should  be able to install a fresh, experimental copy of Moodle.  I would do this and see if it is able to send emails.

Are you sure that your cron job is set up correctly for your new moodle?

In reply to Rick Jerz

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by pst tomowo George -

I do run cron job....


hmmmm....


I tot the cron job is set automatically.... 


hmmm....

In reply to pst tomowo George

Re: 3.1.2 to 3.1.3 upgrade by cpanel (godaddy)

by Just H -

You have to set the cron up manually as it's a server function not a Moodle function; see here.