compiling php from source
Note: You are currently viewing documentation for Moodle 3.1. Up-to-date documentation for the latest stable version of Moodle is probably available here: compiling php from source.
This page shows you how to build PHP from source on Ubuntu or other Debian based distributions. It could no doubt be used as a basis for compiling PHP on other Unix or Linux systems.
It is possible that you may need to do this because the latest versions of Moodle require reasonably new versions of PHP which may not be supported by the packages in your version of PHP - especially "long term support" versions.
This discussion was based on Ubuntu 10.04 which (at the time of writing) is the latest Ubuntu LTS. It does not carry a new enough PHP version for Moodle 2.1.