You Are Here: Home » How-To » Programming

How To Fix “Module php5 does not exist” Error In Apache & Linux?

By on September 3rd, 2012 
Advertisement

Sometimes installing PHP via the regular method does not help you install PHP properly and even after following the standard methods of installing all you get when trying to enable the PHP5 or the PHP module is this error:

ERROR: Module php5 does not exist!

Scratched your head enough already? Well here is a simple solution to the problem but this involves a bit of manual work to do which is very simple anyways.

PHP Logo

PHP Logo

All you need to do is create two configuration files like these:

File 1

Create a file called php.conf in your /etc/apache2/mods-available/ directory and paste the following code snippet in it and save the file:

<IfModule mod_php5.c>
  AddType application/x-httpd-php .php .phtml .php5
  AddType application/x-httpd-php-source .phps
</IfModule>

File 2

Now create another file called php.load in the same directory - /etc/apache2/mods-available/ and put the following line in the file and save it:

LoadModule php5_module /usr/lib/apache2/modules/libphp5.so

Now from command line, enter the following command and your Apache PHP installation should be back to work in no time at all:

a2enmod php && /etc/init.d/apache2 restart

Please let us know if the above solution worked for you.

Advertisement



Related Posts by Tags: , , ,





How To Fix “Module php5 does not exist” Error In Apache & Linux? was originally published on Digitizor.com on September 3, 2012 - 11:17 am (Indian Standard Time)