LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Installing PHP with Apache2 (https://www.linuxquestions.org/questions/debian-26/installing-php-with-apache2-420370/)

jwjody 02-28-2006 02:00 PM

Installing PHP with Apache2
 
OK I followed the directions from here:
http://www.falkotimme.com/howtos/per...arge/index.php

And I have Apache working.

So to check PHP I dropped a file named php_info.php into a directory and the contents of the file was:
Code:

<?
phpinfo();
?>

I do not get the php info displayed on the screen when I bring it up in a web browser. The actual code shows up.

So I found instructions here:
http://us2.php.net/manual/en/install.unix.debian.php
for apache 1.3 and thought I changed it for Apache2. But it still doesn't work.

How do I get PHP enabled for a Debian Sarge install with Apache2?

Thanks

Wells 02-28-2006 02:40 PM

For the part about installing the Apache server, did you happen to do the following part?

Code:

Edit /etc/mime.types and comment out the following lines:

#application/x-httpd-php                                phtml pht php
#application/x-httpd-php-source                phps
#application/x-httpd-php3                      php3
#application/x-httpd-php3-preprocessed          php3p
#application/x-httpd-php4                      php4

If you did, you probably want to uncomment the bits around php3 and php4, because they need to be active in order for php to work.

jwjody 02-28-2006 03:09 PM

Quote:

Originally Posted by Wells
For the part about installing the Apache server, did you happen to do the following part?

Code:

Edit /etc/mime.types and comment out the following lines:

#application/x-httpd-php                                phtml pht php
#application/x-httpd-php-source                phps
#application/x-httpd-php3                      php3
#application/x-httpd-php3-preprocessed          php3p
#application/x-httpd-php4                      php4

If you did, you probably want to uncomment the bits around php3 and php4, because they need to be active in order for php to work.

Ah! Thanks!!

J

tsunami_imcool 03-01-2006 05:24 PM

aah...
 
the way i do this, is i first install apache2
apt-get install apache2

and then i install php4
apt-get install php4

and then i install the mods for apache2 for php4
apt-get install libapache2-mod-php4

then i usually go on and install mysql and phpmyadmin:
apt-get install mysql-server
apt-get install mysql-php4 (or something like that)
apt-get install phpmyadmin

and thats how i get mine to work! and i just let apt-get take care of the technical business!

sridhar11 03-02-2006 02:37 AM

just follow these easy tutorials for apache server configuration with php and ssl support

Apache server tutorials in debian linux

lavluda 03-02-2006 03:44 AM

use:

Code:

apt-get install php4 mysql-server-4.1 apache2
That's all


All times are GMT -5. The time now is 11:28 PM.