Take the 2-minute tour ×  Recently I upgraded PHP to 5.4, but it
seems to be failing on me because APC isn't working with it,
however this gave me no choice but to downgrade to 5.3, how can
I do this?  I executed apt-get remove php5 and apt-get purge
php5 then I removed the 5.4 repo from apt-get then executed apt-
get install php5, it says it was installing 5.3, and I restarted
php-fastcgi and php5-fpm but when I run php -v it says 5.4.  How
can I downgrade from 5.4 to 5.3?  My server is running Ubuntu
11.04.  share|improve this question add comment  5 Answers
Downgrading PHP 5.4 to 5.3  In Ubuntu downgrading process is a
really mess. Here is the script which you could find it useful
(it removes PHP 5.4 and install PHP 5.3):  sudo apt-get remove
--purge `dpkg -l | grep php | grep -w 5.4 | awk '{print $2}' |
xargs` sudo apt-get install php5=5.3.10-1ubuntu3.4
php5-cli=5.3.10-1ubuntu3.4 php5-common=5.3.10-1ubuntu3.4
libapache2-mod-php5=5.3.10-1ubuntu3.4 sudo apt-get install php-
pear=5.3.10-1ubuntu3.4 php5-curl=5