LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-17-2008, 11:25 PM   #1
DangNewbie
LQ Newbie
 
Registered: Apr 2004
Posts: 13

Rep: Reputation: 0
php5 on apache2 won't parse php if pagename not specified.


Hi All,

Thanks for reading.

I just finished reinstalling php5.1.6 for Apache/2.2.3 on FreeBSD 6.2-RELEASE. I've installed it from ports, as a module and cli.

I've actually done it several times and have two problems:

1. It works ok, but when I install the php5-extensions, it stops working and I get a core dump if I try to run anything. I'm sure this has a variety of possible causes, and I expect I will have to install the extensions one at a time to see which is the problem, but am certainly open to ideas if anyone has a better one.

2. This is the one that really has me stumped at this point. If I load a page directly, as http://www.domain.com/index.php, it runs just fine. However, if I load it as the default without the page name, like http://www.domain.com/ it doesn't parse, and starts a file download. If I download the file, it's a text file of the php source. Everything looks ok (I think) in the apache conf file.

Any ideas?

Thanks!
 
Old 05-18-2008, 01:29 PM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
maybe it helps to put a line like that in httpd.conf and restart the server:

DirectoryIndex index.php index.html index.txt
 
Old 05-18-2008, 01:49 PM   #3
DangNewbie
LQ Newbie
 
Registered: Apr 2004
Posts: 13

Original Poster
Rep: Reputation: 0
It's already there.

Thanks. The index is set. If I load / it points to the correct index page, it's just that it isn't parsed.
 
Old 07-25-2008, 08:29 AM   #4
amon
Member
 
Registered: May 2004
Location: UK
Distribution: Debian, Ubantu, CentOS
Posts: 146

Rep: Reputation: 17
Quote:
Originally Posted by DangNewbie View Post
Hi All,
2. This is the one that really has me stumped at this point. If I load a page directly, as http://www.domain.com/index.php, it runs just fine. However, if I load it as the default without the page name, like http://www.domain.com/ it doesn't parse, and starts a file download. If I download the file, it's a text file of the php source. Everything looks ok (I think) in the apache conf file.

I had this issue just now (wasted some time on it) after playing with Apache for 4 hours I tried it on a different computer (as I researched it from home)... Turns out it was an issue with Firefox. I got back to work cleared the cache in firefox and problem solved. Not sure if this is the same but it worked for me.

BTW I'm using: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1

Hope this helps save some other poor sole at least 2 wasted hours
 
  


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
apache2 / php5 wont load .php dave`2005 Linux - Server 1 11-15-2007 06:19 PM
apache2 won't parse php irvken Linux - Software 9 11-26-2006 06:19 AM
Apache2+PHP5 won't serve index.php...sometimes! michaelsanford Linux - Software 1 06-11-2006 08:24 PM
php5 apache2 mysql4 don't work, php does not seem to read php.ini atom Linux - Software 5 03-24-2005 11:05 AM
My Apache2 fails to parse php-scripts in html pages 3-1415 Linux - Software 6 10-21-2004 05:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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