Linux-Noob Forums

Full Version: Php5 & Apache2 on Ubuntu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

PHP5 & Apache2 Installation (For Ubuntu - Breezy)

 

Note: This is pretty simple. Just follow these commands and it should work very easily.

 

Run

 

Quote:apt-get updateapt-get install -t breezy apache2-common apache2-mpm-prefork libapache2-mod-php5LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
If you are like me and tried to install apache2 before hand run this:  

Quote:apt-get remove apache2 apache2-{common,utils}
 

If you still have problems, which I did on my laptop, but not my server. Odd, but here is what I found:

 

During the PHP5 installation it did not create the files in under the /etc/apache2/mods-enabled/ directory... See Below

 

Quote:root@ubuntu-server:/etc/apache2/mods-enabled# lscgi.load  php5.conf  php5.load  userdir.conf  userdir.load
I manually created the files by adding the contents below.

 

php5.conf

Quote:<IfModule mod_php5.c>  AddType application/x-httpd-php .php .phtml .php3

  AddType application/x-httpd-php-source .phps

</IfModule>
php5.load
Quote:LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
 

These files need to be in:

/etc/apache2/mods-enabled/

/etc/apache2/mods-allowed/


ah the easy and joy of ubuntu.. ;)

 

nice one .. ty kzo

I just used the package manager...but then again I dont think I installed .php5...ahhh well apache2 isnt running, I should check it out lol...