[Solved][Webserver] Setting up apache, PHP

Don´t be shy, Linux is fun! =)
Post Reply
User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

[Solved][Webserver] Setting up apache, PHP

Post by ayu »

Was going to setup apache and PHP on my laptop =)

and i did "apt-get install apache" and it went fine. But i can't find which packed i am supposed to use when installing PHP =/ is there a package that i can install from the packages in Ubuntu, or do i have to get it from the PHP site?
Last edited by ayu on 21 Sep 2007, 04:39, edited 1 time in total.
"The best place to hide a tree, is in a forest"

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

ummm....I guess you mean apache2... :-k

to install and enable php4:

Code: Select all

apt-get install php4 libapache2-mod-php4
when done open apache2.conf and uncomment the following lines:

Code: Select all

 AddType application/x-httpd-php .php
AddType application/x-httpd-php-source.phps
restart apache2:

Code: Select all

cd /
etc/init.d/apache2 force-reload
php should be working then, simply try with a phpinfo() site:

Code: Select all

<?php
phpinfo();
?>
:wink:

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

But it didn't say anything about apache2 =/

Should i uninstall apache then and install apache2?
"The best place to hide a tree, is in a forest"

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

hm, I haven't found apache 1 packages for Ubuntu, but I am not sure...is there any output for:

Code: Select all

apache2 -v
?

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

Doesn't seem to be installed ^^

Code: Select all

cats@clare:~$ apache2 -v
The program 'apache2' can be found in the following packages:
 * apache2-mpm-worker
 * apache2-mpm-event
 * apache2-mpm-itk
 * apache2-mpm-prefork
Try: sudo apt-get install <selected package>
bash: apache2: command not found
"The best place to hide a tree, is in a forest"

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

k, apt-get remove apache and then apt-get install apache2..^^

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

Ok thanks mate =)
"The best place to hide a tree, is in a forest"

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

Didn't even have to do all that =D

Code: Select all

apt-get install php5 libapache2-mod-php5
Did everything for me xD


Now THATS what i call service ^^
"The best place to hide a tree, is in a forest"

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

of course, when you install an apache2 library it needs apache2 as dependency...which is automatically solved by apt-get.. :)

Post Reply