LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 11-18-2003, 01:59 PM   #1
neurotic
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware
Posts: 29

Rep: Reputation: 15
Apache php index.php problem


I set up apache to read index.php from the dir (as you would for index.html and so on) but when i load say, localhost/~username/anotherdir/, index.php comes up, but php does not work.

But if i specify it to load localhost/~username/anotherdir/index.php, php works fine.
Is there something i may need to change in my httpd.conf? or php.ini settings? I've set apache up before and this worked fine, i am thinking maybe i just forgot a small thing.
 
Old 11-18-2003, 02:27 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
The order of the pages does matter.

DirectoryIndex index.php index.html index.htm

The above directive looks for a index.php first, then index.html and last index.htm. So if all are present the index.php is used.
 
Old 11-18-2003, 05:30 PM   #3
neurotic
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware
Posts: 29

Original Poster
Rep: Reputation: 15
<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.php index.php4 index.cgi
</IfModule>

Is what I have. Finding index.php is not the problem, when it is found php does not work for index.php. But say if the browser calls domain/dir/index.php php works fine. (vs domain/dir/)
 
Old 11-18-2003, 07:02 PM   #4
neurotic
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware
Posts: 29

Original Poster
Rep: Reputation: 15
Ok, I get home today and it works out of no where. weird

Thanks anyways
 
  


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
index.php lord-fu Linux - Newbie 2 10-17-2005 02:52 PM
index.php help greenmeanie Debian 5 03-09-2005 03:31 AM
php apache or php cgi - php learner rblampain Linux - Security 3 12-18-2004 12:10 AM
rm #index.php# mikeshn Linux - General 3 02-16-2004 01:38 PM
php4 problem _ downloading index.php instead of displaying tharris Debian 2 10-24-2003 07:13 PM


All times are GMT -5. The time now is 06:55 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