The advice is to just use whatever your server comes preinstalled with. Of course, in real life things are never that simple.


If you're stuck on old version of Ubuntu (e.g. hosted webserver), you can try backports to upgrade your php version. Here's a backport of php 5.3.2 (required for Moodle 2.1) I found for Ubuntu Hardy (8.04):

Just follow the guide on and install the package with apt-get install php5.

By the way, if you're installing php for Moodle, be sure that all related packages which are required by Moodle are there:

  • libapache2-mod-php5
  • php5
  • php5-cgi
  • php5-cli
  • php5-common
  • php5-curl
  • php5-gd
  • php5-mysql
  • php5-xmlrpc

If you need to hunt for backports use Google (duh): hardy OR “8.04” “libapache2-mod-php5” “5.3.2”

Personal Tools