Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
php5:
  Installed: 5.3.5-1ubuntu7.10
  Candidate: 5.3.5-1ubuntu7.10
  Version table:
 *** 5.3.5-1ubuntu7.10 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main i386 Packages
        500 http://security.ubuntu.com/ubuntu/ natty-security/main i386 Packages
        100 /var/lib/dpkg/status
     5.3.5-1ubuntu7 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages

How do I fix this?

share|improve this question
    
You might get better answers on Serverfault.com –  Toby Allen Aug 23 '12 at 23:12
add comment

migrated from stackoverflow.com Aug 23 '12 at 23:14

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

2 Answers

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
add comment

"Apache should be looking for modules in "/usr/libexec/httpd/". In there you'll find either a file or symlink called "libphp5.so". If it's a symlink, you'll need to relink to the new 5.2.8 libphp5.so, otherwise just copy the 5.2.8 libphp5.so 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
add comment

Your Answer

 
discard

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.