Moodle installation bricked

Moodle installation bricked

Tobias Fritz -
回帖数:13

Dear Moodle forum,

we are a small school and have a Moodle installation running at a web-provider where we don't have full access to the server.

Today I tried to install a plugin and afterwards I got a blank page. So I went back to the admin settings and tried to deinstall the plugin again. Now all php-pages of the installtion return empty pages. Also if I try to run cli php-scripts by ssh I get empty responses.

Does anybody have any ideas what I could try to fix this?

We're running version 3.10.4

回复Tobias Fritz

Re: Moodle installation bricked

Visvanath Ratnaweera -
Particularly helpful Moodlers的头像 Translators的头像
In that case your Moodle has plug-in installation "on click" active?

What was the plug-in which triggered the crash? What are your PHP version and database server and its version?

You don't have full access to the server but shell access? Shell access is log of access. ;) What type of hosting is that?
回复Visvanath Ratnaweera

Re: Moodle installation bricked

Tobias Fritz -
Hi,

it's https://all-inkl.com/.
PHP version is 7.4.19
Database server is mariadb at version 10.5.11
回复Tobias Fritz

Re: Moodle installation bricked

Visvanath Ratnaweera -
Particularly helpful Moodlers的头像 Translators的头像
OK.

What was the plug-in which triggered the crash?

Any other additional plug-ins that were already installed?
回复Visvanath Ratnaweera

Re: Moodle installation bricked

Tobias Fritz -
The plugin in question was "Upload notification". However we already had problems before. But last time they could be resolved by running upgrade.php from the cli. There are several plug-ins installed and I don't know all of them. Is there any way I can export a list even though the installation is broken?
回复Tobias Fritz

Re: Moodle installation bricked

Visvanath Ratnaweera -
Particularly helpful Moodlers的头像 Translators的头像
That is why this "one click" installations should be banned. https://moodle.org/plugins/local_uploadnotification/versions says, Moodle 3.4, 3.5, 3.6, 3.7 Released: Sunday, 6 May 2018. PHP 7.4.0 was released 28 Nov 2019!

Delete the directory moodle/local/uploadnotification and see whether Moodle comes up.

If you are not familiar with all that, you'll have to revert to the last site backup.
回复Tobias Fritz

Re: Moodle installation bricked

Usman Asar -
Plugin developers的头像 Testers的头像
Tobias, do you at least have access to moodledata folder?
try deleting cache and localcache folder and refresh to see if it shows up, as sometimes during installation of moodle and/or plugins, cache gets corrupted, deleting cache folders often helps.
回复Usman Asar

Re: Moodle installation bricked

Tobias Fritz -
Hi everybody,

thanks for all your help. My colleague resolved it by updating our moodle installation.
So how should I handle trying out plugins in the future to avoid this?

Thanks,

Tobias
回复Tobias Fritz

Re: Moodle installation bricked

Visvanath Ratnaweera -
Particularly helpful Moodlers的头像 Translators的头像
Hi

You wrote:
> My colleague resolved it by updating our moodle installation.

You mean that uploadnotifications plug-in runs on your PHP 7.4? Could you please ask your colleague to document the full solution here? There are always others looking for the same.

> So how should I handle trying out plugins in the future to avoid this?

a) Keep backups of your productive Moodle. b) Don't test on your productive Moodle! Clone it as a test Moodle. How exactly, your colleague knows.
眨眼
回复Visvanath Ratnaweera

Re: Moodle installation bricked

Tobias Fritz -
No, as I wrote above, I triggered an uninstall of the plugin before everything crashed. So I guess, it was removed during the update.
回复Tobias Fritz

Re: Moodle installation bricked

Visvanath Ratnaweera -
Particularly helpful Moodlers的头像 Translators的头像
So it wasn't the colleague after all?

There is a reason why a case summary is useful. Quote: "Once your problem is solved, reply to the thread, adding [Solved] to the subject line of your post and providing links to the documentation, discussion or tracker issue that helped you." From the site policy https://moodle.org/mod/page/view.php?id=7080. Here's a "breaking" example: https://moodle.org/mod/forum/discuss.php?d=383652#p1711118.
回复Visvanath Ratnaweera

Re: Moodle installation bricked

Tobias Fritz -
What do you mean? As I wrote in my first post, I installed the plugin. Then the admin page didn't load anymore but came up blank so I guessed that something broke. But I could still access the plugins page by manually entering it in the URL bar and in this way I tried to uninstall the plugin again. After this, all pages came up blank. But I guess that during the update my colleague did, the plugin was correctly removed as I intended.

I already wanted to mark the subject as solved but I can't find where I can edit the subject...
回复Tobias Fritz

Re: Moodle installation bricked

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像
You should never test plugins on a live site.

The automated plugin installation makes it too easy. IMO it should never be used on a live site. In fact, if it *does* work then the file permissions are too permissive and you have another problem - your site is insecure.
回复Howard Miller

Re: Moodle installation bricked

Lexy Walker -
Core developers的头像
This. We don't install plugins on our live site until we've made a bunch of sanity checks, and checked it on about three different development servers first.

Those sanity checks fall into two categories: "does it work with our site" (correct Moodle, PHP, MySQL versions) and "is it going to be a support nightmare" (is it frequently updated, does it have a bug tracker with hundreds of unresolved bugs, is it a well-used plugin that other big places use).