ForceType and multiple PHP versions

Discussion in 'Apache' started by dereklewis, Nov 24, 2007.

  1. #1
    Hello,

    I have a site hosted with the Dreamhost webhost. I attempted to get this problem solved via their customer support, but have apparently stumped them with this one. They suggested I try asking here. I don't know all the details of their setup, so if you have any questions, please post them, and I will pass them on to get any information you may need.

    In order to make urls on my site more user friendly, I have added the following to my .htaccess:

    
    <files view>
    ForceType application/x-httpd-php
    </files>
    Code (markup):
    This should allow the file "view" to execute as a php script without requiring the .php extension. Dreamhost offers multiple versions of PHP, and it appears that ForceType in my .htaccess is calling the wrong instance of php.

    I have put up a demonstration of the problem at http://proofconcept.dreamhosters.com/

    Both "view" and "view.php" contain the code:

    
    <?php   echo 'Current PHP version: ' . phpversion();   ?>
    PHP:
    And htaccess contains:

    
    <files view>
    ForceType application/x-httpd-php
    </files>
    Code (markup):
    After all of that, my question is: how can I get the correct version of PHP to execute using ForceType?

    Thank you for your help,
    Derek
     
    dereklewis, Nov 24, 2007 IP
  2. dereklewis

    dereklewis Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Never mind, I've figured it out.

    
    <files view>
    ForceType php5-cgi
    </files>
    
    Code (markup):
     
    dereklewis, Nov 25, 2007 IP
  3. powerspike

    powerspike Peon

    Messages:
    312
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes that one can be tricky, you might want to tell the support guys as well, so they will know in the future if the same problem arises =)
     
    powerspike, Nov 25, 2007 IP