how to "activate" php on my GoDaddy server?

Discussion in 'PHP' started by stompergames, Nov 28, 2008.

  1. #1
    If you go to this site i am working on www.hcsauxiliary.org you can view the source and see clearly that I have included a php file through a php include call. The file is in the same dirctory and I was including html code that I know works, but it seems like PHP isnt working on the server at all or something like that. I am pretty sure it supports it, but is there like some sort of htaccess file or php.ini file to initiate it or something? any help is greatly appreciated, thanks!
     
    stompergames, Nov 28, 2008 IP
  2. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #2
    The simple solution is to use a ".php" extension instead of ".html" extension. Giving you "index.php" instead of "index.html"
     
    joebert, Nov 28, 2008 IP
  3. stompergames

    stompergames Peon

    Messages:
    222
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    ok that works! So what is the "more complicated" solution? A line a parsing code to add to htacces?
     
    stompergames, Nov 30, 2008 IP
  4. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #4
    Yep.

    AddHandler x-httpd-php5 .html
    Code (markup):
    Note that a new htaccess file will take a short while to take effect, but if you add that to an existing htaccess file it should take effect immediately.
     
    joebert, Nov 30, 2008 IP