.PHP files download instead of get interpreted

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
raptor354
Forum Newbie
Posts: 13
Joined: Tue Jun 16, 2009 3:21 pm

.PHP files download instead of get interpreted

Post 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
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: .PHP files download instead of get interpreted

Post 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.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
raptor354
Forum Newbie
Posts: 13
Joined: Tue Jun 16, 2009 3:21 pm

Re: .PHP files download instead of get interpreted

Post 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...
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: .PHP files download instead of get interpreted

Post 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.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Post Reply