.PHP files download instead of get interpreted

Discussion in 'Apache' started by Raptor354, Jul 18, 2010.

  1. #1
    Hello,

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

    This website needs to "server-side include" php files. When I tell php files to be handled with server-parsed and I navigate to one of these php pages, the browser wants me to download the file. What do I need to do to use php files as php files AND be able to "include" them in other files?

    Any thoughts?

    Raptor354
     
    Raptor354, Jul 18, 2010 IP
  2. Algore

    Algore Peon

    Messages:
    963
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Php is not configured properly

    Try reinstalling it once more

    Are you using Cpanel ??
     
    Algore, Jul 18, 2010 IP
  3. Raptor354

    Raptor354 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Unfortunately, the PHP install is out of my control.

    Yes, I am using Cpanel.

    At one point, the system did work. In my fiddling, I broke it. I only touched the Apache handlers.
     
    Raptor354, Jul 19, 2010 IP
  4. anands

    anands Well-Known Member

    Messages:
    436
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    120
    #4
    If you are running PHP as apache module try adding
    to httpd.conf

    if you are using php as CGI try adding
    to httpd.conf

    if you still have trouble, get professional assistance.
     
    anands, Jul 19, 2010 IP
  5. travelguides

    travelguides Peon

    Messages:
    107
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If you don't have access to the php installation on the server, you're probably hosted on a shared server which would mean you can't access/modify the httpd.conf either. You can, however, add those lines to your .htaccess file.
     
    travelguides, Jul 25, 2010 IP