How do I set the PHP version?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SeanCustomer
    Junior Member
    • Jun 2006
    • 16

    #1

    How do I set the PHP version?

    I tried to search the forums, but there were a lot unrelated results returned.

    In my account, my own website is PHP4. But for a client hosted under my reseller account, they have PHP5. How is that governed?

    In this case, I need their account to be PHP4 and it cannot be PHP5. How do I change this?

    And if it were the reverse situation, how then? Just wanted to ask for posterity's sake.

    Thanks in advance for treating me with kid gloves.
    ============================
    Edit: It turns out I should have already known the answer. PHP4 runs on the account by default.

    If you want PHP5, you can name your files .php5 to activate that. Or, if you want files to be named just .php, then you can put a line into the .htaccess such as
    AddHandler application/x-httpd-php5 .php

    To go back to PHP4, just remove that.
    Last edited by SeanCustomer; 01-26-2007, 01:24 PM.
  • AndrewT
    Administrator
    • Mar 2004
    • 3655

    #2
    Your ticket has been resolved but I'll go ahead and respond here to clarify.

    PHP 4 is always the default. You can change it to PHP 5 by following the directions here:

    UPDATE 2/10/09 - PHP 4 is no longer available. You can, however, still use this same AddHandler directive in your .htaccess files to process alternative file extensions as PHP scripts. PHP5 is now included on every server. PHP4 is still running with mod_suphp and will run by default. PHP5 also runs with mod_suphp on all .php5

    Comment

    • crash resistant
      Junior Member
      • Jun 2004
      • 14

      #3
      Can I put the .htaccess file in the root and it apply to the whole site? Or do I have to put it in each folder?

      Comment

      • AndrewT
        Administrator
        • Mar 2004
        • 3655

        #4
        If you put the .htaccess file in your public_html directory it will apply to the entire account.

        Comment

        Working...