469,609 Members | 1,713 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

unable to install LAMP

sid
Hi! I am a total newbie in php and am wanting to use LAMP on my pc
with ubuntu 8.04. The problem is that Even after installing everything
correctly, the .php files when opened are downloaded by the
browser(firefox) instead of viewing it.
Please help me out with this.
Thank you.
Jun 27 '08 #1
9 1122
On 4 Jun, 11:03, sid <kingsiddha...@gmail.comwrote:
Hi! I am a total newbie in php and am wanting to use LAMP on my pc
with ubuntu 8.04. The problem is that Even after installing everything
correctly, the .php files when opened are downloaded by the
browser(firefox) instead of viewing it.
Please help me out with this.
Thank you.
If everything is installed "correctly" and you are trying to access
the files by pointing your browser at your local server (localhost),
then it would be working properly.

So either you are not pointing your browser at the correct place, or
everything is not installed correctly.

Since it is not working, what makes you think that everything is
correct?
Jun 27 '08 #2
Have tried connecting to localhost once you have started it...

It will also fail if you havnt put the files in the directory or set
it as a site

On Jun 4, 11:03*am, sid <kingsiddha...@gmail.comwrote:
Hi! I am a total newbie in php and am wanting to use LAMP on my pc
with ubuntu 8.04. The problem is that Even after installing everything
correctly, the .php files when opened are downloaded by the
browser(firefox) instead of viewing it.
Please help me out with this.
Thank you.
Jun 27 '08 #3
On 4 Jun, 11:48, Joff <Jonathan.Benne...@gmail.comwrote:
>
It will also fail if you havnt put the files in the directory or set
it as a site
Please do not top post.
That cannot be the problem as the OP has stated that everything has
been installed correctly.
What you have suggested would be an incorrect installation.
Jun 27 '08 #4
sid wrote:
Even after installing everything
correctly, the .php files when opened are downloaded by the
browser(firefox) instead of viewing it.
What are you typing at Firefox's address bar?

--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Fortune: You will be attacked next Wednesday at 3:15 p.m. by six samurai
sword wielding purple fish glued to Harley-Davidson motorcycles.

Oh, and have a nice day!
-- Bryce Nesbitt '84

Jun 27 '08 #5
sid
On Jun 4, 4:26*pm, Iván Sánchez Ortega <ivansanchez-...@rroba-
escomposlinux.-.punto.-.orgwrote:
sid wrote:
Even after installing everything
correctly, the .php files when opened are downloaded by the
browser(firefox) instead of viewing it.

What are you typing at Firefox's address bar?

--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Fortune: You will be attacked next Wednesday at 3:15 p.m. by six samurai
sword wielding purple fish glued to Harley-Davidson motorcycles.

Oh, and have a nice day!
* * * * * * * * -- Bryce Nesbitt '84
I am typing http://localhost/test.php
or
http://127.0.0.1/test.php

where test.php is the file stored in my /var/www/test.php
also I have stored the same file in /var/www/apache2-default/test.php
Jun 27 '08 #6
If you installed the PHP manually , you need to register the .php as a
executable type and register the handler.
you need to do this in APACHE configuration file. (i forgot the exact
syntax)

otherwise APACHE will treat as a non parseable file type

On Jun 4, 10:24*am, sid <kingsiddha...@gmail.comwrote:
On Jun 4, 4:26*pm, Iván Sánchez Ortega <ivansanchez-...@rroba-

escomposlinux.-.punto.-.orgwrote:
sid wrote:
Even after installing everything
correctly, the .php files when opened are downloaded by the
browser(firefox) instead of viewing it.
What are you typing at Firefox's address bar?
--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
Fortune: You will be attacked next Wednesday at 3:15 p.m. by six samurai
sword wielding purple fish glued to Harley-Davidson motorcycles.
Oh, and have a nice day!
* * * * * * * * -- Bryce Nesbitt '84

I am typinghttp://localhost/test.php
orhttp://127.0.0.1/test.php

where test.php is the file stored in my /var/www/test.php
also I have stored the same file in /var/www/apache2-default/test.php
Jun 27 '08 #7
try typing

sudo apt-get install libapache2-mod-php5

in a shell.
Jun 27 '08 #8
sid
On Jun 4, 11:23*pm, macca <ptmcna...@googlemail.comwrote:
try typing

sudo apt-get install libapache2-mod-php5

in a shell.
Its already installed.
Jun 27 '08 #9
Well something's not right.

I have three Ubuntu servers at home and installing PHP is as easy as
1,2,3

1. sudo apt-get install apache2

2. sudo apt-get install php5 libapache2-mod-php5

3. sudo /etc/init.d/apache2 restart
Bish Bash Bosh - job done!
Jun 27 '08 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Geoff Blake | last post: by
4 posts views Thread by KJemison | last post: by
10 posts views Thread by Zabby | last post: by
4 posts views Thread by Eric West | last post: by
2 posts views Thread by Francesco | last post: by
reply views Thread by Solution2021 | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.