See if the libphp5.so module is installed elsewhere on the server using the find and locate command
# find / -name libphp5.so
# locate libphp5.so
if it is, copy it to /usr/lib/apache2/modules/ directory and restart Apache.
If the file is not present, install the ‘libapache2-mod-php5′ package, the PHP5 module for Apache2. It adds the required FilesMatch directives to the Apache configuration.
# apt-get install libapache2-mod-php5
The ‘libapache2-mod-php5′ package will create the libphp5.so file under the modules directory and apache2 will restart successfully
# /etc/init.d/apache2 restart
if you want to go with downgrade:
Remove PHP
sudo apt-get remove php5-common
sudo apt-get remove php5-cli
sudo apt-get remove php5
sudo apt-get autoremove memcached
Update your sources list to point to PHP 5.2
sudo nano /etc/apt/sources.list
Remove the references to PHP 5.3 packages. For me that was:
deb http://php53.dotdeb.org stable all
deb-src http://php53.dotdeb.org stable all
Add the following 5.2 packages:
deb http://http.us.debian.org/debian stable all
deb http://security.debian.org/ stable/updates main contrib
deb http://packages.dotdeb.org/ stable all
Install PHP 5.2
sudo apt-get update
sudo apt-get install php5-cli
sudo apt-get install php5
Reinstall any PHP modules your application requires. For me that was:
sudo apt-get install memcached
sudo apt-get install php5-memcache
sudo apt-get install php5-curl
sudo apt-get install php5-mysql
sudo reboot