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.

.htaccess, AddType application/x-httpd-php .php .htm .html, and maybe a Fix...

Discussion in 'Co-op Advertising Network' started by LegalClipper, Jan 8, 2005.

  1. #1
    Hi, After about 24 Hours of Trial and Error I finally got my site Validated.

    I traced it to the .htaccess file. When I was bringing up my site, the ads wouldn't show and the .php wouldn't execute. And sometimes my Browser would try to download the webpage instead of just view it. So I went back and forth on tech support with my ISP LunarPages.

    Seems they run something called suPHP and the contents of .htacess must be:

    AddType x-httpd-php .php .htm .htm

    (notice it doesn't have the 'application/' in it.)

    I guess suPHP doesn't like the 'application/' .

    I am new at this, but it might work for you if you are having a rough time..

    :)

    LegalClips.com
     
    LegalClipper, Jan 8, 2005 IP
  2. sarathy

    sarathy Peon

    Messages:
    1,613
    Likes Received:
    76
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Thanks, i would try this :)
     
    sarathy, Jan 8, 2005 IP
  3. aurelian

    aurelian Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Try adding that code lines in apache.httpd.conf

    <IfModule mod_mime.c>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .phtml
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php .php4
    AddType application/x-httpd-php .html
    AddType application/x-httpd-php-source .phps
    </IfModule>
    Save it and restart apache with command : apachectl restart
    you have more info at http://bugs.php.net/bug.php?id=27580
     
    aurelian, Mar 8, 2007 IP
  4. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #4
    Anyone with cpanel can add that command there, no need to mess around with the .htaccess since that darn file can make your site not load at all if you don't do it right
     
    fryman, Mar 8, 2007 IP
  5. thundercow

    thundercow Well-Known Member

    Messages:
    246
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    108
    #5
    I was having this same problem. This fix did not work for me. bummer, still stuck on this.
     
    thundercow, Mar 10, 2008 IP
  6. vanshake

    vanshake Peon

    Messages:
    95
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    here's another option along those lines:

    instead of:
    addtype application/x-httpd-php .html

    try:
    <FilesMatch "\.(htm|html|php)$">
    SetHandler application/x-httpd-php
    </FilesMatch>
     
    vanshake, Mar 26, 2008 IP
  7. voltolio

    voltolio Greenhorn

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #7
    For anyone on Godaddy (or another host) having trouble getting php to parse within html with .htm extension I finally found the problem:

    .htaccess is:

    AddType application/x-httpd-php .php .htm .html
    AddHandler x-httpd-php .php .htm .html

    Delete old .htaccess - don't overwrite.

    Upload new .htaccess in ascii mode and chmod 777

    Done!
     
    voltolio, Apr 22, 2008 IP
  8. webfelogix

    webfelogix Active Member

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #8
    i saw on someone site actually the script is php files but using code like this
    AddType application/x-httpd-php .jsp

    he mask all the .php files to .jsp, i mean just for fun sake i want to try out but i put in on my htaccess didnt work, i got two server, hostgator and lunarpages both are using susphp enviroment, any idea if some knows how to mask?
     
    webfelogix, May 7, 2008 IP
  9. steveh2008

    steveh2008 Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9

    I have cpanel through hostgator. I have uploaded the php file by creating a txt file and renaming it with the .php extention but I still cannot get the .htaccess to work. I tried doing the same thing using a .txt file but it wont work, it will not display the page unless I delete the .htaccess file.

    You said there is a way to do it in cpanel but I cant figure it out. Can you explain how you did it?
     
    steveh2008, May 12, 2008 IP
  10. hasen

    hasen Peon

    Messages:
    994
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Well you won't get any response from Fryman since that post was made in March last year and he's been banned for ages.
     
    hasen, May 13, 2008 IP
  11. bsutcliffe

    bsutcliffe Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I have the following .htaccess file, uploaded to the correct place:

    AddType application/x-httpd-php .php .htm .html .wml
    AddType text/x-httpd-php .php .htm .html .wml
    (after reading a few posts, apparently this should help)
    AddHandler x-httpd-php .php .htm .html .wml
    (after reading a few posts, apparently this also should help)

    However, .php files download and .wml files (when viewed on Wapsilon.com) return a "expected text/vpn.wap.wml not application/x-httpd-php".

    Any ideas?
     
    bsutcliffe, May 25, 2008 IP
  12. pulsart

    pulsart Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    try this line in a blank .htaccess

    AddType application/x-httpd-php php html
     
    pulsart, Jun 28, 2008 IP
  13. medicalsupplies

    medicalsupplies Banned

    Messages:
    168
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #13
    the codes work great for lunapage host.
     
    medicalsupplies, Jul 25, 2008 IP
  14. donatello

    donatello Peon

    Messages:
    67
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Wow!
    Thanks a lot for that post! It worked for me like magic after about 2 hours of screwing around and even calling support at Backlinks.com.

    Then I found your post and BINGO!
    Thanks a million. It works like a charm now! :D
     
    donatello, Jul 29, 2008 IP
  15. webprone

    webprone Well-Known Member

    Messages:
    163
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    133
    #15
    hey thanks for the info
    i also face the same errors
    http://www.honeytechblog.com/images/error.jpg

    not fix the server was upgraded and there were incompatible lines in the .htaccess are also fixed.
    www.honeytechblog.com works perfectly now.


    For all who have hosting on Hostgator,Godaddy and similar cpanel
    Please contact your support team, they will easily resolve your issues.

    ThankYou
     
    webprone, Sep 3, 2008 IP
  16. marclindsay

    marclindsay Peon

    Messages:
    135
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #16
    VanShake.... Thankyou very much...

    After trying everything, yours was the only solution that worked..... Thanks heaps

    Marc
     
    marclindsay, Oct 28, 2008 IP
  17. notebook murah

    notebook murah Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    how about wordpress blog ,can somebody having success install this ads and validate ,give explain simple and easy
     
    notebook murah, Nov 16, 2008 IP
  18. yangyang

    yangyang Banned

    Messages:
    757
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #18
    If you are using php5, it should be: AddHandler x-httpd-php5 .php .htm .html

    And sometimes it's better using php5-script instead of x-httpd-php5.
     
    yangyang, Jan 18, 2009 IP
  19. kmofo

    kmofo Active Member

    Messages:
    442
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    85
    #19
    But for php4 is it php4-script or php-script?
     
    kmofo, Apr 16, 2009 IP
  20. kmofo

    kmofo Active Member

    Messages:
    442
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    85
    #20
    Silly me, I've double posted .... Can a mod delete this? Thanks
     
    kmofo, Apr 16, 2009 IP