Upgrading 3.3 to 3.5.9 and plugin check doesn't display

Upgrading 3.3 to 3.5.9 and plugin check doesn't display

by Danja Mewes -
Number of replies: 16

Hello, I am upgrading a client's site's moodle from 3.3+ to 3.5.9 prior to a PHP version change taking place on their host tomorrow (7.1 to 7.2). I am able to get past the initial check with everything clear except a suggestion about xmlrpc, but still meeting the minimum requirements. When I press "continue" to what should be the plugin check page I get HTTP error 500...:

This page isn’t working


What would cause the plugin check page to not display on upgrade? I turned on developer debugging and am not getting any more detailed error messages.

How can I fix this? 

Thanks for any advice
Average of ratings: -
In reply to Danja Mewes

Re: Upgrading 3.3 to 3.5.9 and plugin check doesn't display

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
What does the web server's error log say about it?
In reply to Howard Miller

Re: Upgrading 3.3 to 3.5.9 and plugin check doesn't display

by Danja Mewes -
I unfortunately do not have access to this.
In reply to Danja Mewes

Re: Upgrading 3.3 to 3.5.9 and plugin check doesn't display

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Then find someone who does. Other than that, you're just going to be guessing what the cause of the 500 error is.
In reply to Howard Miller

Re: Upgrading 3.3 to 3.5.9 and plugin check doesn't display

by Danja Mewes -
I created the error log per what you sent (loopia's instructions), placed the htaccess file calling it in the moodle folder, and I am not getting anything except warning messages referring to the other site on the server. Is this not what you meant?
In reply to Danja Mewes

Re: Upgrading 3.3 to 3.5.9 and plugin check doesn't display

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Then it's not right. Or you need to speak to your host's support about it. It's highly unlikely (in fact, I'm almost prepared to say impossible) that a 500 error will not be logged *at all* in a correctly set up log
In reply to Danja Mewes

Re: Upgrading 3.3 to 3.5.9 and plugin check doesn't display

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
How exactly are you upgrading? What process? Have you checked permissions? Cleared caches?
In reply to Emma Richardson

Re: Upgrading 3.3 to 3.5.9 and plugin check doesn't display

by Danja Mewes -
after backing up the website and the db, I uploaded the files via FTP, changed the old moodle folder name to moodle_old, uploaded the old config.php file to the new moodle. It recognizes that an upgrade is taking place, it checks that the system meets the requirements - but the plugincheck doesn't show, I get a "this page isn't working". All the folder permissions appear exactly the same.

The issue was also present prior to upgrade if I tried to update a plugin, it would send me to a blank (this page isn't working) page where in the URL I could see plugincheck=0. I did not install this moodle originally and I do not have access to anything I cannot see via FTP.
In reply to Danja Mewes

Re: Upgrading 3.3 to 3.5.9 and plugin check doesn't display

by Ken Task -
Picture of Particularly helpful Moodlers

Not giving enough clues!!! smile

Plus ... "The issue was also present prior to upgrade if I tried to update a plugin" ... oooops, attempting upgrade with a known problem is biting now.  Upgrade will check plugins.

So can we see what the config.php file looks like ... download via binary mode, rename config.php to config.txt, edit in a text editor to 'x' out lines that contain info you shouldn't share ... like DB user, DB password, URL, etc.

Do leave the line for location of moodledata ... that's a path.

Hard to imagine that remotely hosted anything these days don't provide more than FTP to customers - things like cPanel.

One bit of info that might help, where is this site hosted?  Provider name.   And, what service your customer has ... like 'shared hosting', etc.

Would also suggest, you need to add debug lines from config-dist.php file (Section 7) to the active config.php file to see if more clues could be provided.

Also, since this site was already installed, wonder if you couldn't ask the customer how it was installed initially.

'SoS', Ken


In reply to Ken Task

Re: Upgrading 3.3 to 3.5.9 and plugin check doesn't display

by Danja Mewes -
The provider is loopia.se. There is no c-panel access that my client has provided me from them, I have asked several times. They have not told me what type of hosting they have:

Below is the config.php file:
<?php // Moodle configuration file

unset($CFG);
global $CFG;
$CFG = new stdClass();

$CFG->dbtype = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'xxxxx.loopia.se';
$CFG->dbname = 'xxxxxx';
$CFG->dbuser = 'xxxxxx';
$CFG->dbpass = 'xxxxx';
$CFG->prefix = 'mdl_';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbport' => 3306,
'dbsocket' => '',
'dbcollation' => 'utf8mb4_general_ci',
);

$CFG->wwwroot = 'http://xxxxxxx.se/moodle';
$CFG->dataroot = '/www/webvol5/kw/a9hc3h44sd2xm96/xxxxxxx.se/moodledata';
$CFG->admin = 'admin';

$CFG->directorypermissions = 0777;

require_once(__DIR__ . '/lib/setup.php');


One thing to note is that their database in phpMyAdmin language is set to Swedish. Could that cause any issues with upgrade?
In reply to Danja Mewes

Re: Upgrading 3.3 to 3.5.9 and plugin check doesn't display

by Ken Task -
Picture of Particularly helpful Moodlers

In order for customers to have control over php versions apps run, providers offer a thing called 'easyapache' ... which is really  about PHP.

Provider offers multiple versions of PHP via EasyApache (or some tool like EA) and in the environment of the customer login/use of cPanel, etc. the default PHP version might be higher or too low from what you need to do the upgrade (although think there are other issues involved).

So ... in the moodle_old directory, is there a hidden .htaccess file?  And in that file are there comments that indicate php version and other php settings?

IF so, copy the .htaccess file from moodle_old to the new code in 'moodle'.

Thought you said the only access you had was FTP?  How did you determine PHPMyAdmin uses Swedish?   BTW, that is default for MySQL as that's the country in which MySQL was developed.   It's OK for server, but DB for Moodle needs to have utf8mb4 character set with collation of utf8mb4_general_ci according to config.php file.

Also a question concerning your FTP transfer of moodle code ... did you tranfer via binary mode or ascii mode?

If the  later, some files might have gotten corrupted on upload.

See in your config.php  DB host has a FQDN ... is that host the same as where the  code resides?

And without some way to see logs ... error 500's or the web service error you can see, really doesn't provide much of a clue.

'SoS', Ken

In reply to Danja Mewes

Re: Upgrading 3.3 to 3.5.9 and plugin check doesn't display

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

Re: Upgrading 3.3 to 3.5.9 and plugin check doesn't display

by Ken Task -
Picture of Particularly helpful Moodlers

Danja thanks you Howard! smile

In a private communication, appears Danja may have been 'bushwhacked' ... not on purpose, mind ya, but given what might be mission impossible with only FTP access and Moodle Admin creds.

Issue could involve themes ... cause they are plugins ... in the new code folder, default theme is 'boost' ... which could be causing some issues with caching in moodledata/cache/ or moodledata/localcache or if site using a theme compat with 3.3 but not 3.5.highest.

So one thing you can do with FTP alone ... add a line to config.php to set default theme to one that comes with 3.5.9+:

$CFG->theme='clean';

That forces use of clean theme.

Also ... moodle code is in a subdirectory ... with nothing 'on top' of it ... like a WordPress.   Still though, their could be a hidden .htaccess file there.  Those files are heirarcheal ... setting in the top level applies to everything below it.

If there is an .htaccess file at same level as moodle code directory, suggest renaming it to htaccess.txt.   Nginx shouldn't attempt to read it then.

And since the upgrade is kinda stuck now, you might have to manually remove contents of moodledata/sessions/.

Site is already a 7.1.32 PHP wise. And if provider pulled the trigger on upgrading php for customers ... your 3.3 -> 3.5.9 should be ok PHP wise ... from what I re-call.

Ok, Saturday here and time to watch some American College Football ... big games today! smile

'SoS', Ken


In reply to Ken Task

Re: Upgrading 3.3 to 3.5.9 and plugin check doesn't display

by Danja Mewes -
I have tried almost the whole list of suggestions and still have the same issues.
Here's what I have done:
*re-uploaded moodle 3.5.9 making sure "binary" was set in Filezilla
*added the line to force the theme to "clean" in config.php
*cleared the sessions in moodledata
*all cache was purged and is still purged, but I haven't manually done any other purging besides sessions, only what was available in the moodle admin settings
*checked again for an htaccess file but there is none in moodle. the moodledata one, located in the directory above public_html, says:

deny from all
AllowOverride None
Note: this file is broken intentionally, we do not want anybody to undo it in subdirectory!

There is another folder called "moodledata" which is under public_html (moodle folder is also under public_html) which solely consists of a .htaccess.txt file saying:
order deny,allow
deny from all

*Per the suggestion above created an htaccess file, almost exactly as was given in the example, to report errors as well as httpd-error log file for the errors to be reported to. The htaccess file was placed in the moodle folder, it points to the directory above public_html. The output from attempting the upgrade is below, none seem to refer to this site... it all refers to the other site hosted on the server so I am even more confused now. Could the other site be effecting it? how? The htaccess file calling this error log is in **not** in the moodle folder that is referred to below!

[30-Nov-2019 20:22:23 Europe/Stockholm] PHP Warning: Zend OPcache API is restricted by "restrict_api" configuration directive in /www/webvol5/kw/a9hc3h44sd2xm96/xxxothersitenonserver.com/public_html/moodle/admin/index.php on line 80
[30-Nov-2019 20:22:25 Europe/Stockholm] PHP Warning: Zend OPcache API is restricted by "restrict_api" configuration directive in /www/webvol5/kw/a9hc3h44sd2xm96/xxx.xxxothersiteonserver.com/public_html/moodle/lib/classes/component.php on line 1190
[30-Nov-2019 20:22:28 Europe/Stockholm] PHP Warning: Zend OPcache API is restricted by "restrict_api" configuration directive in /www/webvol5/kw/a9hc3h44sd2xm96/xxx.xxxothersiteonserver.com/public_html/moodle/admin/index.php on line 80
[30-Nov-2019 20:22:28 Europe/Stockholm] PHP Warning: Zend OPcache API is restricted by "restrict_api" configuration directive in /www/webvol5/kw/a9hc3h44sd2xm96/xxx.xxxothersiteonserver.com/public_html/moodle/lib/classes/component.php on line 1190

Thanks again. At this point I just want it to work for the client and time is running out! Any help?
In reply to Danja Mewes

Re: Upgrading 3.3 to 3.5.9 and plugin check doesn't display

by Ken Task -
Picture of Particularly helpful Moodlers

In config.php file:

$CFG->dataroot = '/www/webvol5/kw/a9hc3h44sd2xm96/xxxxxxx.se/moodledata';

so does that folder have folders like 'cache,localcache,sessions,temp,environment,lang,lock,filedir,trashdir'

The moodledata that has all of those is the one config.php should be pointed to.

That also has the .htaccess file that says/shows:

deny from all
AllowOverride None
Note: this file is broken intentionally, we do not want anybody to undo it in subdirectory!

That is normal for a remotely hosted moodle on a system where setup does not allow customer to put moodledata at the same level as public_html AND the nginx user writing to it ... customers web/document root for nginx.

You have something in front of your moodle:

93.188.2.51: webfront1.webcluster.loopia.se

Wonder if that server is what allocates the other server's domain/settings/setup.

One tangled web set up there!

**Contact hosing provider for the following:

"PHP Warning: Zend OPcache API is restricted by "restrict_api"

One needs access to config of opcache to turn off those warnings ... and in your case, might be the cause of upgrade issue.

'SoS', Ken


In reply to Ken Task

Re: Upgrading 3.3 to 3.5.9 and plugin check doesn't display

by Danja Mewes -
I fixed the issue! It ended up being a memory issue. I finally got the error log spitting out something that made sense: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted .

I set the memory limit in the htaccess file I had created in the moodle directory - I managed then to see the plugincheck page and proceed on to finish the upgrade!

Also good for others to know that at first it showed a lower bytes allowed, and when I fixed this at first, going to moodle/admin then showed a "redirect error". I tried to solve this other ways but it ended up still being a memory issue when I checked so I increased the limit once more and that worked

Everything works now, thanks for all the help!
In reply to Danja Mewes

Re: Upgrading 3.3 to 3.5.9 and plugin check doesn't display

by Ken Task -
Picture of Particularly helpful Moodlers

Congrats!

+20 Howard! smile

Did you manage to upgrade those plugins you mentioned earlier as well?

Might be a good time to ask 'customer' to review/research what level of service (plan) they have with provider.  Moodle sites that are used only grow ... they don't get smaller ... thus more mem/resources + pretty soon here customer should be seeing notifications the version they are running is

Might run environment check and update component, then set to highest version of moodle (which is now 3.8+) to see if server continues to meet requirements.   Uhhh ... the check doesn't address memory.   That's before you get 'bushwhacked' again to do upgrade over a holiday! :|

https://docs.moodle.org/dev/Releases#Moodle_3.5_.28LTS.29

Bug fixes for general core bugs in 3.5.x ended May 2019 (12 months).
Bug fixes for security issues in 3.5.x will end 10 May 2021 (36 months).

'SoS', Ken