Probs after Ubuntu upgrade

Probs after Ubuntu upgrade

by Sonja Sperber -
Number of replies: 8

Hi,


again I need help...

we run Moodle 2.9.1 on a server. I upgraded the OS -Release of the server

from ubuntu 14.04. to  16.04 :


root@moodle:/var/www/html# lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 16.04.1 LTS

Release: 16.04

Codename: xenial

root@moodle:/var/www/html# 


Now I'm no longer able to install new Moodle - instance (i.e Releases

I downloaded from Moodle) e.g. for test purposes. What is more , there are

plugins in other Moodle-Instances that are not working properly. 

I think is due to php7 which is shipped with Ubuntu 16.04.

Right ?

In the apache logs I found the folowing:


[Thu Sep 08 18:11:14.937006 2016] [:error] [pid 6237] [client 141.22.37.147:49186] PHP Stack trace:, referer: http://.../moodle-test/admin/index.php?lang=en

[Thu Sep 08 18:11:14.937017 2016] [:error] [pid 6237] [client 141.22.37.147:49186] PHP   1. {main}() /var/www/html/moodle-test/theme/styles_debug.php:0, referer: http://..../moodle-test/admin/index.php?lang=en

[Thu Sep 08 18:11:14.937025 2016] [:error] [pid 6237] [client 141.22.37.147:49186] PHP   2. require() /var/www/html/moodle-test/theme/styles_debug.php:31, referer: http://.../moodle-test/admin/index.php?lang=en

[Thu Sep 08 18:11:14.937032 2016] [:error] [pid 6237] [client 141.22.37.147:49186] PHP   3. require_once() /var/www/html/moodle-test/config.php:26, referer: http://.../moodle-test/admin/index.php?lang=en

[Thu Sep 08 18:11:14.941178 2016] [:error] [pid 6261] [client 141.22.37.147:49187] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; filterobject has a deprecated constructor in /var/www/html/moodle-test/lib/filterlib.php on line 438, referer: http://.../moodle-test/admin/index.php?lang=en



I downgraded php to php 5.6.

...does not help.


Can you get me started here in order to overcome these probs.

I would be very grateful!


Best,

Sonja






Average of ratings: -
In reply to Sonja Sperber

Re: Probs after Ubuntu upgrade

by Ken Task -
Picture of Particularly helpful Moodlers

Don't run Ubuntu, but a linux is a linux, right? (not really)

So a question ... did you upgrade the OS in place?  IF so, would that replace some config files for newer version of OS? ... like php.ini.   And would an in place upgrade acquire all the PHP extensions that was installed on older OS?

I've read, but never experenced first hand, that upgrading the Ubuntu OS is possible in place, but have also read that could have hickups.

Your command to check for 'linux standards base' modules shows no LSB modules.   Was there before in previous OS version?

How about checking php extensions?

php -m

The errors show them referencing styles debug and language .. default is 'en'.

What does: ls -lR lang

look like as root while in the directory for moodle code

Hopefully, the above is a start.

'spirit of sharing', Ken

In reply to Sonja Sperber

Re: Probs after Ubuntu upgrade

by Dominique-Alain Jan -

Hello Sonja

I don't think that Moodle 2.7 si php 7 ready. You must use at least 3.1 for that.  Also most of third-party plugins are definitely not php 7 ready yet.  

My advise is then to check first the compatibility of your plugins with php7 and then use Moodle 3.1.x.

Other advices here were to start fresh instead of upgrading Ubuntu.  I never experienced troubles in upgrading ubuntu so far, but the advice is good and wise although time consuming.

All the best 

-dajan

In reply to Sonja Sperber

Re: Probs after Ubuntu upgrade

by Saša Stamenković -
Dear Sonja,

I had seen this before. Whenever you intend to upgrade the Ubuntu, you need to pray first and then enter sudo do-release-upgrade. smile

I hope that you have at least one functional Moodle instance on your new server and if so, check /admin/environment.php to see what php extensions are the cause of this issue.

Please provide an output here, so that we can assist you.

Kind regards,
Saša Stamenković


In reply to Saša Stamenković

Re: Probs after Ubuntu upgrade

by Albert Ramsbottom -

Hi

Never, ever upgrade the OS with a working application running on it. Just leave as is, why fix something that aint broken?

A server is a server! if its running fine then leave it for 14 years smile

PHP 7???

Albert

In reply to Sonja Sperber

Re: Probs after Ubuntu upgrade

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

Your problem is PHP 7. 

16.04 comes with PHP7 (there is no option for PHP5.x). So what happens is that PHP is removed and left like that. You need to manually install PHP(7) with apt (used to be apt-get). 

I can see why they did this - it forces you to think through the implications of moving to PHP7 as it is quite different.

As has been pointed out, even if you install PHP7 you will also need to upgrade Moodle to 3.1. Neither is the end of the world. Any optional plugins you use might be (they may never have been tested with PHP7).

sudo apt install php

wink

PS... I'm not sure leaving even a server alone for ever is a good idea. However, it's rarely a good decision to upgrade a supported version unless you have a compelling reason to do so. 

Average of ratings: Useful (1)
In reply to Sonja Sperber

Re: Probs after Ubuntu upgrade

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

You said:
> Now I'm no longer able to install new Moodle - instance (i.e Releases I downloaded from Moodle) e.g. for test purposes.

How did you proceed? Where you had to stop? Why?

> What is more , there are plugins in other Moodle-Instances that are not working properly.

So you installed this and "other Moodle instances" after all?

> I think is due to php7 which is shipped with Ubuntu 16.04.

Did you think or do you have proof?

Here is a start before touching Moodle: Create a file named phpinfo.php with the single liner:
<?php phpinfo(): ?> in the same directory as the Moodle's config.php and visit http://yoursite/phpinfo.php in a web browser. Post the result here. You'll find more details in the docs under https://docs.moodle.org/29/en/PHP#PHP_info.
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: Probs after Ubuntu upgrade

by Sonja Sperber -

Hi,

.. and sorry for being late.

now I'm sure it's all because of the Moodle version.  It was also not possible to create 

questions (--> error message).  I switched back to php 5.6 and it works.


Best,

Sonja