Upgrading Ubuntu server and PHP

The Scheme’s hardware runs on a Linux/Apache/MySql/Php stack and was quite out of date. The following details how I upgraded the system and is a reference point for the next server that we have to upgrade.

Upgrade ubuntu hardy to 10.04

Issue the following commands in your shell window see http://www.simmonsconsulting.com/2009/03/08/howto-upgrade-ubuntu-lts-804-server-to-PHP-528/ and follow the prompts when requested to do so:

Upgrade PHP

To upgrade from bundled PHP of 5.3.2 to 5.3.6: see http://www.zalexblog.com/2011/01/07/installing-PHP-5-3-3-on-ubuntu-10-04/#comment-339 and issue the following commands and answer the prompts when requested:

Which will show:

Then issue:

Which will show:

To upgrade apc cache:

Check version at the shell prompt via:

Install latest version by issuing the following command at the shell prompt:

Restart apache:

PHP errors you might encounter

You might see this error when you run PHP -v:

This is a known bug with this version of Ubuntu, just edit the # to ;  in the imagick.ini file (see http://www.asim.pk/2010/06/21/php-depreciated-errors-on-ubuntu-10-04-lts/ for example of others agreeing.)

Subsequent upgrade to Ubuntu Precise (12.04)

Run the commands and follow the prompts:

You might see this error:

Which relates to python, a quick fix for this is to do the following:

Then issue:

Follow the prompts and choose whether to keep your packages when asked, then reboot when finished.

Leave a Reply