LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 02-28-2006, 03:00 PM   #1
jwjody
Member
 
Registered: Sep 2003
Posts: 37

Rep: Reputation: 15
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
 
Old 02-28-2006, 03:40 PM   #2
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 383

Rep: Reputation: 31
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.
 
Old 02-28-2006, 04:09 PM   #3
jwjody
Member
 
Registered: Sep 2003
Posts: 37

Original Poster
Rep: Reputation: 15
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
 
Old 03-01-2006, 06:24 PM   #4
tsunami_imcool
Member
 
Registered: Mar 2005
Distribution: Debian
Posts: 80

Rep: Reputation: 15
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!

Last edited by tsunami_imcool; 03-01-2006 at 06:25 PM.
 
Old 03-02-2006, 03:37 AM   #5
sridhar11
Member
 
Registered: Dec 2002
Location: us
Posts: 108
Blog Entries: 333

Rep: Reputation: 15
just follow these easy tutorials for apache server configuration with php and ssl support

Apache server tutorials in debian linux
 
Old 03-02-2006, 04:44 AM   #6
lavluda
Member
 
Registered: Jan 2006
Location: Dhaka, Bangladesh
Distribution: Debian sid, Suse 9.3 pro, Mandrake 10.0, Redhat 7-9, FC-2,3, Gentoo 2006,2006.1
Posts: 89
Blog Entries: 2

Rep: Reputation: 15
use:

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2.0.52, t1lib-5.0.2, php-apache2-5.0.2 wizard7423 Slackware 2 04-04-2011 09:09 PM
Suse 9.3/apache2/php4 - Firefox tries to download index.php, other *php pages work stefanlasiewski Suse/Novell 1 01-18-2006 07:12 PM
Apache2 and PHP unreal128 Suse/Novell 0 05-10-2005 09:51 PM
php5 apache2 mysql4 don't work, php does not seem to read php.ini atom Linux - Software 5 03-24-2005 12:05 PM
PHP 4.3.4 on Apache2 wenberg Linux - Software 3 02-08-2004 01:03 PM


All times are GMT -5. The time now is 08:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration