The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Index.php wants to download instead of...

Discussion in 'General Discussion' started by ccreighton, Aug 6, 2004.

  1. ccreighton

    ccreighton Active Member

    Joined:
    Aug 28, 2001
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    index.php wants to download instead of showing as a webpage.

    Any ideas?
     
  2. fullroast

    fullroast Registered

    Joined:
    Nov 1, 2003
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    ccreighton - I had the same problem. thaphantom's suggestion fixed it for me.
     
  3. Mike Peel

    Mike Peel Active Member

    Joined:
    May 1, 2004
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    I'm currently having a similar problem. PHP files download rather than load normally, and at the domain name I just get the message "There is no website configured at this address." Have recompiled Apache through whm several times, getting an error message saying that php can't find "//bin" (apparently a config error, although I don't know where the config would be...). I then updated cpanel, and again compiled apache through it with the same results. Using easyapache as described above has no effect. Any ideas, anyone...?
     
  4. GufyMike

    GufyMike Member

    Joined:
    Feb 9, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    GOt one MIME types check and make sure the .php extension is set right

    http://httpd.apache.org/docs/mod/mod_mime.html <-- Aapche docs


    Under the <module mod_mime.c>

    Make sure these are in your httpd.conf file
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php4
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php-source .phps
    AddType application/x-httpd-php .phtml
     
  5. Mike Peel

    Mike Peel Active Member

    Joined:
    May 1, 2004
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    The nice support people at my host managed to solve my problem - basically the line "NameVirtualHost sharedip" was missing from my httpd... No ideas why cpanel decided to drop that line from the config file... Wierd.
     
  6. PanelGuy

    PanelGuy Well-Known Member

    Joined:
    Oct 13, 2004
    Messages:
    106
    Likes Received:
    0
    Trophy Points:
    16
    index.php tries to download

    What was The Phantom's Suggestion?
     
  7. aby

    aby Well-Known Member

    Joined:
    May 31, 2005
    Messages:
    638
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Are you sure that the apache is started with the php module enabled in the httpd.conf?
     
  8. PanelGuy

    PanelGuy Well-Known Member

    Joined:
    Oct 13, 2004
    Messages:
    106
    Likes Received:
    0
    Trophy Points:
    16
    I'm positive it wasn't. PHP is setup as a CGI on the server in question.
     
Loading...

Share This Page