Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Today I updated PHP 5.2 to 5.3 but then Apache Startup doesn't work.

Apache says:

Starting web server: apache2apache2: Syntax error on line 205 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/ into server: /usr/lib/apache2/modules/ cannot open shared object file: No such file or directory

Cannot load /usr/lib/apache2/modules/

Is downgrading PHP 5.3 to PHP 5.2 a good idea? If so, how can I do it?

share|improve this question

See if the module is installed elsewhere on the server using the find and locate command

# find / -name
# locate

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 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 stable all
deb-src stable all

Add the following 5.2 packages:

deb stable all
deb stable/updates main contrib
deb 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
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.