Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This server is running ubuntu 9.04, apache 2 and running running PHP 5.2.6-3ubuntu4.4 from the repository. I installed another a new version of PHP (5.3.1, compiled from source), I then replaced the link of this version with /usr/bin/php5. Now cli loads the new version

name:/$php -v
PHP 5.3.1 (cli) (built: Dec 9 2009 21:44:18 )
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

However, apache still loads the old version. What should I do to get apache load the new version?

share|improve this question
up vote 0 down vote accepted

/usr/bin/php(5) is only used by the CLI version of PHP.

On Ubuntu Apache loads its PHP from /etc/apache2/mods-{available,enabled}/php5.load. What you need is to disabled that loading and instead load your own

share|improve this answer
This is exactly what I am looking for, thanks :) – user28770 Dec 10 '09 at 20:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.