1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to parse php??

Discussion in 'Apache' started by fryman, Jan 9, 2005.

  1. #1
    I am going crazy, I have tried every combination I have found on the net, and every time I do a change to my htaccess file my site goes down. I just can't find a way to parse the damn php in html. Any help? For example, take a look at www.templategarage.net/test.htm, it shows that is not parsing, just get a blank page.

    HELP!!!!!
     
    fryman, Jan 9, 2005 IP
  2. mushroom

    mushroom Peon

    Messages:
    369
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If your web server is php enabled the web page must have a php extention for the php module to be called, change it to "test.php"
     
    mushroom, Jan 9, 2005 IP
  3. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #3
    That's not what he's trying to do:

    <html>
    <head></head>
    <body>
      <h1>
      <?php echo "I LOVE PHP!"; ?>
      </h1>
    </body>
    </html>
    
    Code (markup):
    First question, though, is indeed: does your hosting service support PHP?
     
    minstrel, Jan 9, 2005 IP
  4. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #4
    Geez... I was trying to avoid having live links on my post, why do you need to quote me?

    www.templategarage.net/test.php

    Yup, it supports php
     
    fryman, Jan 9, 2005 IP
  5. Christopher

    Christopher Peon

    Messages:
    482
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Second question, does your host allow you to alter the .htaccess file.

    If your host does support php, and you can edit your .htaccess file, we should be able to get your php parsing on .html files.

    If you do change that to 'test.php' (as a test), does it work? That would indicate that you do have php.
     
    Christopher, Jan 9, 2005 IP
  6. Christopher

    Christopher Peon

    Messages:
    482
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Opps, see you answered the php question as I was asking it :)
     
    Christopher, Jan 9, 2005 IP
  7. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #7
    I don't know if my host "allows" it, although I've never heard of one that doesn't.

    Every time I upload a new htaccess file my site goes down.

    I see in my cpanel that there is an icon that says "Apache Handlers". If I click on it, I get to what is attached on my image. Any idea if parsing can be done by inserting something here?
     
    fryman, Jan 9, 2005 IP
  8. Christopher

    Christopher Peon

    Messages:
    482
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I have some basic .htaccess instructions for this at:

    http://www.onyoursite.com/dothtml.html

    maybe will help?
     
    Christopher, Jan 9, 2005 IP
  9. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #9
    looks like the place to do it.

    Put .html or whatever your file extensions are in the left box and application/x-httpd-php in the right one
     
    chachi, Jan 9, 2005 IP
  10. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #10
    YES!!!!! Thank you so much, chachi!!!!!! It works!!
     
    fryman, Jan 9, 2005 IP
  11. Christopher

    Christopher Peon

    Messages:
    482
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Congrats fryman, glad 'cha got it :)
     
    Christopher, Jan 9, 2005 IP
  12. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #12
    Yeah... but it seems like a waste of time, since I was trying to get some coop ads up, but they just won't show.

    Oh, well... this site is going to Ebay tonight anyway... what the heck ;)
     
    fryman, Jan 9, 2005 IP
  13. celt

    celt Peon

    Messages:
    123
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #13
    It shouldn't be a waste of time. Adding an Apach handler in cPanel was exactly how I got my coop ads showing on my website.
     
    celt, Jan 13, 2005 IP