Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Hybrid View

  1. #1

    Default HTML files forced to download

    I've just updated my 3.0 account to a 4.0 cPanel account, and I'm going through some growing pains. Right now I'm having trouble with HTML and PHP playing nicely together. Basically, browsers keep trying to download any html files rather than display them.

    I have Wordpress installed in my root directory, and I have this line in my .htaccess file:

    AddType application/x-httpd-php .html

    This worked fine under 3.0 but it's not working now. Any thoughts?

  2. #2
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    .htaccess is limited in WH 4.0. Have you looked at the interface for page types in cPanel? I need to log in to double check on exact wording but there is a way to add types via it. Let me go log in.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  3. #3
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    Found it! On the right at the very bottom under Advanced is Apache Handlers. Try using that.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  4. #4
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    Hold on... I think that you need to use server-parsed as the handler instead of application/x-httpd-php. Makes sense because in WH 4.0 PHP is runnin in cgi mode.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  5. #5
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    Ok found more info. I really wish WH would create documentation for things like this. It is possible that the handler would be just x-httpd-php. There are many flavors of cPanel setups and I am not 100% sure what WH is using. I don't think there are any other alternatives though.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  6. #6

    Default

    Hmmm, I used the Apache Handlers tool in cPanel to force .htm and .html extensions to be server-parsed, but I'm still having the same problem.

  7. #7
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    cPanel is just adding the entry to a .htaccess file so you are right it is the same thing as what you where doing manually. Let me log in and check my WHM. I seem to recall something there about parsing php. Might be something you need to have WestHost do if you don't have a reseller account.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  8. #8
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    I am stumped. I've tried every variation I can think of and they don't work. Did not find anything in my WHM so it may have been I saw that when I was working over at VPS.net and a full version of WHM. I think you'll have to contact WestHost and ask them why the documented stuff does not work on WH 4.0.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  9. #9
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    I figured it out! It seems the handler you need to use would be application/x-httpd-php5. Now if for some reason you are running php 4 instead then I be you would need to change that to application/x-httpd-php4. PHP 5 is the default on an account. This is working for me on a test account.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  10. #10

    Default

    It works! Thanks, Shawn! By the way, I found your tutorial on importing Wordpress databases from WH3.0 to 4.0 very helpful as well!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •