LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-30-2004, 09:16 PM   #1
delamatrix
Member
 
Registered: Nov 2004
Posts: 43

Rep: Reputation: 15
Apache & PHP


I have PHP 4 installed on my system but what do I need to do to get it working right with Apache? What changes or additions do I need to make to httpd.conf if any. When I connect to apache through my web browser, example ---> (://localhost/test.php) <------ , the browser treats it like the .php file is not recognized and prompts me to download or open it. This can't be right. Any help would be greatly appreciated. Thanks.

- Delamatrix
 
Old 11-30-2004, 09:54 PM   #2
kpex
Member
 
Registered: Apr 2004
Distribution: Slackware -current, Gentoo, FC3
Posts: 41

Rep: Reputation: 15
In /etc/apache/httpd.conf, uncomment the line near the end of the file so that it reads:
Code:
Include /etc/apache/mod_php.conf
As mentioned in httpd.conf, you'll need to make sure you have the appropriate packages installed. You'll also want to take a look at /etc/apache/mod_php.conf and /etc/apache/php.ini, but for normal usage you won't have to change anything in these files.
 
Old 11-30-2004, 11:14 PM   #3
delamatrix
Member
 
Registered: Nov 2004
Posts: 43

Original Poster
Rep: Reputation: 15
kpex,
thank you very very very much. I'm so grateful. Thank you once again!

- Delamatrix
 
Old 12-01-2004, 12:43 PM   #4
tortle
Newbie
 
Registered: Jul 2004
Location: Wisconsin
Distribution: OpenSUSE, SUSE, Slackware
Posts: 22

Rep: Reputation: 15
getting apache to recognize index.php

Hi:

One more change that you will usually want to make: in /etc/apache/httpd.conf, around line 435 there is a line that looks like:

DirectoryIndex index.html

You will need to add "index.php" to this line if you want to be able to have an "index.php" treated as an automatic index page the way that "index.html" is. For example:

DirectoryIndex index.php index.html

In this case, if both "index.php" and "index.html" exist in a directory and the user browses in without specifying one or the other, the "index.php" page will be used.

You will need to restart Apache for this to take effect. As root:

# /etc/rc.d/rc.httpd restart
 
  


Reply



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
Slackware guide for AMP Apache MySQL & PHP xushi Slackware 35 05-11-2006 11:18 AM
ISS & ASP/.NET or Apache & PHP fuelinjection General 3 12-06-2005 07:41 AM
Apache & php & mod_dav Byenary Linux - Software 1 07-09-2005 01:26 PM
apache && php help needed issey Linux - Newbie 5 03-30-2005 11:28 AM
From RedHat9 to FreeBSD (Apache 2 & Mysql & PHP 4) guardian653 *BSD 5 12-11-2003 05:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

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
Open Source Consulting | Domain Registration