Installing and upgrading help

Blank screen after moving and upgrading to latest version

 
Picture of Attila Gal
Blank screen after moving and upgrading to latest version
 

Hey guys,

I get blank screen after moved Moodle to un upgraded Moodle instance on a new test server.

Moved Moodledata, html folder and SQL database

Apache2.log shows:

[php7:error] [pid 1870] [client X.X.X:51409] PHP Fatal error:  Cannot use 'object' as class name as it is reserved in /var/www/html/public_html/lib/setuplib.php on line 66

This line 66 mention in setuplib.php  : class object extends stdClass {

Any idea guys??

There is a similar issue here: https://moodle.org/mod/forum/discuss.php?d=353327 but it doesn't help in my case


Old server:

Hosted solution

mysql (5.5.59-cll)

PHP     5.6.36

Moodle release 3.2.8+   Moodle version 2016120508.01


New server:

Own Ubuntu 18.04 server

mysql Ver 14.14 Distrib 5.7.22

PHP  7.2.7

Moodle  3.5.1+

 
Average of ratings: -
Picture of Howard Miller
Re: Blank screen after moving and upgrading to latest version
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

You can't run Moodle 3.2 with PHP 7.2.

Which isn't what you said you did but that line 66 isn't 'class object' in 3.5.1+

Make sure really have updated the Moodle code. 

 
Average of ratings: -
Picture of Attila Gal
Re: Blank screen after moving and upgrading to latest version
 

Oh. Do you mean I have to update Moodle on the old server before importing to the new? Is there a way to leave the production server as is and do the work only on the new?

 
Average of ratings: -
Picture of Howard Miller
Re: Blank screen after moving and upgrading to latest version
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

Your issue is your PHP version. If you want to upgrade on the old server you will also need to upgrade PHP. 

If you want to upgrade on the new machine you can't run the original version first. This doesn't matter. Just load the new code and run the upgrade. 

 
Average of ratings: Useful (1)
Picture of Ken Task
Re: Blank screen after moving and upgrading to latest version
Particularly helpful Moodlers

Other than what Howard has already said, have one more suggestion on the *new* server since it appears you can access as root.

Apache on the new server already knows about /var/www/html/ ... that's it's 'document root' by default.  I see in the error provided you have moodle code in /var/www/html/public_html/ public_html has some special settings in apache config and is restricted .. not like /var/www/html/.   That's if you hadn't already changed your apache server config to use /var/www/html/public_html/ as document root in the main configuration file for apache.

So suggest moving (mv) all files from public_html ... up one level so that they are all in /var/www/html/

Don't forget to get the hidden files (the 'dot' files).    

Would make moving your local/development moodle up to a true VPS server a little easier ... I would think.

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Attila Gal
Re: Blank screen after moving and upgrading to latest version
 

First of all thank you Howard and Ken for the helping hand !!

I have installed PHP 5.6 which did solve the blank page problem.

Now, I just have to figure out the PHP upgrade.

 
Average of ratings: -