Upgrading problems

Upgrading problems

by Gunilla Brattberg -
Number of replies: 21

For many years I have installed Moodle on various web hosting companies and I have myself two Moodle installations running without problems. They are both in version 3.3.2. Since May this year I have tried to upgrade them but the resources of my web hotel do not allow later versions of moodle. It is one of the largest web hotels in Sweden! They have now installed php 7.2 and php_extension intl in one of my folders and then it was possible to upgrade Moodle even though there were some warnings. I upgraded a copy of my functioning database. It seemed to work okay.

However, when the upgrade was complete, it was impossible to log in, even to create a new account. I really don´t know how I shall be able to get my two moodle installations upgraded to version 3.6.1. I work completely voluntarily with moodle courses and I am after many years using moodle near to give up.

Sincerely,

Gunilla B.

Average of ratings: -
In reply to Gunilla Brattberg

Re: Upgrading problems

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

What happens if you install a brand new copy of Moodle 3.6.1?  Let us know what the warnings are?

Are you sure that your server meets all of the requirements to run Moodle 3.6.1?  How do you know that php 7.2 is running?  How have you verified this?

(I am not the expert, I just am giving you some ideas that might help me or others.)

In reply to Rick Jerz

Svar: Re: Upgrading problems

by Gunilla Brattberg -

Before I can install e brand new copy of Moodle I have to ask the web hotel to create another folder with php 7.2. It will take some time.

I have verified in the settings of the web hotel that the used foilder has php 7.2.

Listed requirements för moodle are: PHP 7.0, MariaDB 5.5.31 or MySQL 5.6 or Postgres 9.4 or MSSQL 2008 or Oracle 11.2. These requirements should be fulfilled in the folder where I upgraded moodle.



In reply to Gunilla Brattberg

Re: Svar: Re: Upgrading problems

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

I am not a "server" person, but I have never heard of this "create a folder with php 7.2."  One way to check what one has on a server is to add a small file containing the following to your web site, as in www.mywebsite.com/info.php.  This then reports what your server sees.

Another way to do this is to go into a working copy of Moodle, Site Admin| Server| php info.

I don't know what takes so much time to install a new Moodle.  However, I have no idea of your server and its details.  I am just trying to brainstorm a little with you and hope that someone else might have some better ideas.


In reply to Gunilla Brattberg

Re: Upgrading problems

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I'm not clear what you mean by "web hotel". 

Moodle 3.6 requires PHP 7.0.0 as a minimum. 7.2 is not required. 

In reply to Gunilla Brattberg

Re: Upgrading problems

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

What do you mean you cannot log in?  What is the error you get?  Have you turned debugging on? What were the warnings with the upgrade?  We need some more info please...

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

Svar: Re: Upgrading problems

by Gunilla Brattberg -

When I login nothing happens. When I try to create a new account I get this message: Felaktig sesskey inskickad, formuläret accepterades inte! (Wrong sesskey sent, the form wasn´t accepted).

I don´t know where to set debugging when I can´t login

Enabling debugging

To enable debugging, go to Debugging in the Site administration.


The process to upgrade seemed to work well. I can´t remember the "warnings" and I can´t recreate them but there were no severe warning which interfered with the upgrading process.

As I upgraded a copy of my earlier working installation I expected to be able to login with the same user name and password.

Moodle tell me that the loginproblem can be:


  1. Your site doesn't have the PHP setting "session.auto_start=0" (see Installing Moodle - software)
  2. You logged out at some time between opening the form and submitting it.
  3. You have followed a bad link to a form script.
  4. Your database has an incorrect value for sessioncookiepath in the mdl_config table.
  5. You edited the code in a file on the server while logged in to your moodle website.

Where do I set "session.auto_start=0"?

In reply to Emma Richardson

Svar: Re: Upgrading problems

by Gunilla Brattberg -

Hi again,

I tested to login on the website in Firefox and it did work!!!! Usually I use Google Chrome but in this browser it is impossible to login. I don´t know why. May be it has something with  cookies to do. Google has changed their security settings this year.


When I logged in I got the following message:

An error occurred during registration update (The hub cannot access your site at http://varkstaden.se/datorklinik_352. Your Moodle site and the hub need to be able to communicate with each another. If you are unable to register your site please email support@moodle.org) 


In reply to Gunilla Brattberg

Svar: Re: Upgrading problems

by Gunilla Brattberg -

I have now been able to choose theme and all the earlier courses are available but the links to all images must be broken somewhere. No image at all show up - only placeholders for the images. How can i fix that without being forced to import all the images in all courses once again.

I have used "Search and replace" to change url, but the images don´t show up after this operation.

In reply to Gunilla Brattberg

Re: Svar: Re: Upgrading problems

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
For a Moodle site you need to decide whether to have www in front of the domain or not. You have set DNS for both, with and without www. Your SSL (HTTPS) certificate is with www, so you need www.

BTW, your site is https://... (with S)!
In reply to Visvanath Ratnaweera

Svar: Re: Svar: Re: Upgrading problems

by Gunilla Brattberg -

When I in Chrome write https://www.varkstaden.se/datorklinik_352/index.php the browser changes the address to http://varkstaden.se/datorklinik_352.

In Firefox there is no problem to login but the site is not secure, https change to http. May be SSL doesn´t embrase the filder datorkliniken-352.

In reply to Gunilla Brattberg

Re: Svar: Re: Svar: Re: Upgrading problems

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
I can only talk of Moodle. In its config.php the parameter $CFG->wwwroot must be https://www.varkstaden.se/datorklinik_352.
In reply to Visvanath Ratnaweera

Svar: Re: Svar: Re: Svar: Re: Upgrading problems

by Gunilla Brattberg -

Thank you, I have changed to https://www.varkstaden.se/datorklinik_352

The two problems I deal with just now are:

1. Impossible to login in Chrome but okay in Firefox.

2. No images are visible. May be I have to search and replace paths.

In reply to Gunilla Brattberg

Re: Upgrading problems

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
1. Clear the cache in Chrome! There are plenty of how-tos in the net.

2. Yes, you might need this https://docs.moodle.org/en/Search_and_replace_tool. Be WARNED, read all the warnings there before you do it!
Average of ratings: Useful (2)
In reply to Visvanath Ratnaweera

Svar: Re: Upgrading problems

by Gunilla Brattberg -

Thank you for all idéas of how to get this installation to work!


1. Cache in Chrome is cleared and now I can login!!

2. Regarding the paths to images:

In my old working installation the path to one image is: 

https://www.varkstaden.se/datorklinik/pluginfile.php/2/course/section/1/gb.jpg

The path to the same nit visible image in my new installation is:

 

It seems correct?!

In reply to Gunilla Brattberg

Re: Svar: Re: Upgrading problems

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
> 2. Regarding the paths to images:
> In my old working installation the path to one image is:
> ...
What is that curved keyboard? An Alfa Romeo?
smile

> The path to the same nit visible image in my new installation is:
>
> It seems correct?!

The path has vanished!

Well, a definite answer is not possible. It all depends on the domain you had, whether there was a directory name, http or https? And whether you are happy with the new URL, I mean the 352th dotorklinik?
wink
In reply to Gunilla Brattberg

Re: Svar: Re: Upgrading problems

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

Not seeing the new path...

In reply to Emma Richardson

Re: Svar: Re: Upgrading problems

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
So scary...
big grin
In reply to Visvanath Ratnaweera

Svar: Re: Svar: Re: Upgrading problems

by Gunilla Brattberg -

Thank you for all answers.

The "new path" is: https://www.varkstaden.se/datorklinik_352/pluginfile.php/2/course/section/1/gb.jpg


My intension is to create a new installation in the folder datorklinik_352 and when all works okay change the name to datorklinik and replace all paths.


The old installation which now is in folder datorklinik will then be renamed to datorklinik_old.

That is how I earlier have upgraded and replaced the old installation with the upgraded installation.

I have no more time today but I will try to come further tomorrow.


Thank you all for your patience with my problems!

I wish you a happy new year.

Gunilla



Average of ratings: Useful (1)
In reply to Gunilla Brattberg

Svar: Re: Svar: Re: Upgrading problems

by Gunilla Brattberg -

Hi,

I have now solved the problem with the images by changing moodledata directory.

I have also renamed the folder with the new installation and the address is now https://www.varkstaden.se/datorklinik/.


In the Administration panel I read: 

Enabling PHP setting display_errors is not recommended on servers in operation with users because some error messages may reveal sensitive information about your server.

Where do I inactivate display_errors?

/Gunilla


In reply to Gunilla Brattberg

Re: Upgrading problems

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Glad that you could resolve your problem. You may rate useful threads as 'Useful' (see the drop-down below each post).

Also, please try to keep a discussion to the subject. Continuing on an initial question on something else, in "blog fashion", is not done. I propose you either start a new thread, say "Enabling PHP setting display_errors is not recommended", or even better, try to find the answer yourself. (Hints: https://docs.moodle.org/, https://moodle.org/mod/forum/search.php?id=5 )
Average of ratings: Useful (1)
In reply to Gunilla Brattberg

Re: Svar: Re: Svar: Re: Upgrading problems

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The browser isn't changing the address...

Average of ratings: Useful (1)