Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

I recently upgraded from PHP 5.3.4 to PHP 5.4.4, and now I want to downgrade. I removed all the packages through apt-get remove php5 after removing the repository, and then ran apt-get install php5 but still, Apache can't start now and the error log shows:

[Thu Aug 23 19:01:10 2012] [notice] Apache/2.2.17 (Ubuntu) PHP/5.4.4-4~natty+1 configured -- resuming normal operations

I even ran this to make sure there is no more 5.4.4:

root@server:~# apt-cache policy php5
  Installed: 5.3.5-1ubuntu7.10
  Candidate: 5.3.5-1ubuntu7.10
  Version table:
 *** 5.3.5-1ubuntu7.10 0
        500 natty-updates/main i386 Packages
        500 natty-security/main i386 Packages
        100 /var/lib/dpkg/status
     5.3.5-1ubuntu7 0
        500 natty/main i386 Packages

How do I fix this?

share|improve this question

migrated from Aug 23 '12 at 23:14

This question came from our site for professional and enthusiast programmers.

You might get better answers on – Toby Allen Aug 23 '12 at 23:12

when you did apt-get remove php5 you have just removed the meta-package.

To list all php5 packages you have installed you need to do: dpkg -l '*php5*' and then remove all installed, or just do apt-get remove php5-common, which will remove "base" package which is the dependency of all other php5 packages in the dependency chain and thus remove all installed php5 packages.

Cheers, Ondrej

share|improve this answer

"Apache should be looking for modules in "/usr/libexec/httpd/". In there you'll find either a file or symlink called "". If it's a symlink, you'll need to relink to the new 5.2.8, otherwise just copy the 5.2.8 to "/usr/libexec/httpd/" and restart apache with "sudo apachectl restart"."

Taken from How do I tell Apache which PHP to use?

share|improve this answer
Can't find the directory /usr/libexec. – Ryan Aug 23 '12 at 23:17

You could try

sudo apt-get purge php5-*
share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.