Page 1 of 1

.PHP files download instead of get interpreted

Posted: Fri Jul 16, 2010 2:40 pm
by raptor354
Hello,

I'm building a website that covers some new ground for me.

I've got a linux server running Apache. I set some special handlers to parse PHP files server-side. My problem is: now when I try to navigate to anything with a .php extension, the browser tries to download the file. I want it to be properly interpreted and the results displayed.

Any thoughts?

Raptor354

Re: .PHP files download instead of get interpreted

Posted: Fri Jul 16, 2010 2:42 pm
by AbraCadaver
This means that PHP probably isn't install? What flavor of Linux? This should be much easier with packages such as RPM or DEB.

Re: .PHP files download instead of get interpreted

Posted: Fri Jul 16, 2010 2:52 pm
by raptor354
In fact, PHP is installed. If I get rid of the Apache handler that associates .php files with the server-parsed handler, I can't use server-side includes, but the files do parse properly.

Perhaps this is more of a question for the Apache forums...

Re: .PHP files download instead of get interpreted

Posted: Fri Jul 16, 2010 8:47 pm
by AbraCadaver
raptor354 wrote:In fact, PHP is installed. If I get rid of the Apache handler that associates .php files with the server-parsed handler, I can't use server-side includes, but the files do parse properly.

Perhaps this is more of a question for the Apache forums...
I'm an old linux guy and used to do this stuff by adding into httpd.conf etc, but now its much easier to install the apache package, php package, ssi package, etc. At least in Ubuntu it will modify the httpd.conf and anything else that is needed.