PDA

View Full Version : [SOLVED] Lamp


anderskitson
March 17th, 2008, 10:17 PM
I am using this site http://howtoforge.com/ubuntu_lamp_for_newbies to Guide me Through a straighforward Lamp Install. All I want to be able to do is use it localy for now, that's all I need because I am just learning php and Mysql. I am stuck at testing php. When I follow this link, http://localhost/testphp.php I am just prompted to download the file not view the test page like it states, what am I missing here. "I have Restarted Apache Server As Well"

hackertarget
March 17th, 2008, 10:47 PM
Was this command from the guide successful?

sudo apt-get install php5 libapache2-mod-php5

Once you have installed these you should have a line in your httpd configs for AddType application/x-httpd-php .php.

You can test this is present by typing: grep -R php /etc/apache2/*

After restarting apache this should work.

anderskitson
March 17th, 2008, 11:11 PM
This Is what I get from Grep
/etc/apache2/mods-available/dir.conf: DirectoryIndex index.html index.cgi index.pl index.php index.xhtml
/etc/apache2/mods-available/php5.conf:<IfModule mod_php5.c>
/etc/apache2/mods-available/php5.conf: AddType application/x-httpd-php .php .phtml .php3
/etc/apache2/mods-available/php5.conf: AddType application/x-httpd-php-source .phps
/etc/apache2/mods-available/php5.load:LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
/etc/apache2/mods-enabled/dir.conf: DirectoryIndex index.html index.cgi index.pl index.php index.xhtml

But it is still doing the same thing

anderskitson
March 18th, 2008, 02:45 PM
Not sure if this helps but in my
httpd.conf file all that is in there is this
servername localhost

anderskitson
March 18th, 2008, 05:48 PM
I fixed my problem all is good