Upgrading to Moodle 2.7+

Upgrading to Moodle 2.7+

by Joel Riddell -
Number of replies: 2

Hi,

I am having difficulty upgrading my Moodle box to Moodle 2.7+ It is a Ubuntu box and I haven't had a problem any other upgrade it's just now that this install requires me to upgrade our current version of PHP 5.3.10 to at least PHP 5.4.4.

I have never done an upgrade of PHP before so am completely new to it. I have followed all the steps I can find on the internet to do the upgrade but can't get it to work. 

From my Googling around I am guessing that the new PHP install overwrites certain config files but I have no idea how to get around that. Is it possible to just copy config files from the old install and overwrite them on the new?

Any guidance would be great.


Thanks,

Joel

Average of ratings: -
In reply to Joel Riddell

Re: Upgrading to Moodle 2.7+

by Ken Task -
Picture of Particularly helpful Moodlers

It might help to know the specific version of Ubuntu (Long Term Support or other?)

It's not only PHP, but MySQL: requirements on downloads.moodle.org says: PHP 5.4.4,MySQL 5.5.31

And there are extensions to PHP that are also required/highly recommended.

And please provide reference to the FAQ's/docs, etc. you found and used to upgrade PHP.   Were they official Ubuntu docs or other blog posting?

Without knowing specifics to operating system version, etc. found this via Google:

http://askubuntu.com/questions/343560/update-server-php-version-to-5-4-10-via-the-command-line

but the above might not apply to your situation and it does contain a twist, but does state:

PHP 5.4.10 is not available in the Ubuntu repositories for 12.04.

Truth in attempting to assist ... don't run Ubuntu but CentOS (unfortunately stuck with 5.10 on some systems).   But there is something I've experienced with that OS/setup that might apply to yours (depending) ... conflicts with libraries/extensions when attempting to upgrade what's in place.  Have ended up removing PHP and then installing again via yum (package manager) [you probably use apt-get etc. for Ubuntu].  While you are working through this, good idea to shut down apache first because your config.php file would be directly accessible/downloadable (if you've used a login/password that also applies to an ssh login to the system).  Broken PHP means .php files are no longer scripts to be run, but ascii pages to server out.  While config.php doesn't display anything to a browser, it could be acquired via wget and thus downloader has some info they shouldn't have.

Once you have php upgraded, restart your apache server and check with phpinfo.php file.

If you have tweaked php.ini save a copy out of /etc/ to your home directory for comparing.   If you have tweaked mysql (my.cnf) do the same.   More than likely you will have to re-tweak.  Do NOT copy the old config files to replace the new config files.   Matter of fact, it's a good idea to check the config-dist.php file of 2.7 for changes that you can add to your active config.php file.

Am guessing that Ubuntu MySQL similar to CentOS so after upgrading your MySQL don't forget to run mysql_upgrade.

And, in closing, hopefully a true Ubuntu person will respond with their technically correct suggestions/references. ;)

'spirit of sharing', Ken


In reply to Ken Task

Re: Upgrading to Moodle 2.7+

by Joel Riddell -

Hi Ken,

Thank you so much for your time in assisting, I greatly appreciate it. Good point on the MySQL I looked past this but it appears I will probably have to also update MySQL as well as I am running Ver 14.14 Distrib 5.5.24.

The version of Ubuntu I am running is Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-31-generic x86_64)

The blog I read instructions from for upgrading PHP was - http://www.dev-metal.com/how-to-setup-latest-version-of-php-5-5-on-ubuntu-12-04-lts/ - So that wasn't official Ubuntu documentation but hopefully provides accurate steps?

I read the post from the link you gave me and that could be another issue as I am on 12.04, I was trying to upgrade to the newest version of PHP which I believe is PHP5.5 so I wonder if that's also an issue?

Thanks so much again for all your help Ken smile I shall give it all a go and let you know how I progress.

 

Kind Regards,

Joel