+ Reply to Thread
Results 1 to 8 of 8

Thread: PHP version 4 and 5

  1. #1
    Fibo_fr's Avatar
    Fibo_fr is offline New Bee
    Join Date
    Jul 2008
    Posts
    4
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PHP version 4 and 5

    Hello,

    This has probably been asked and solved here, but I could not find where...

    My shared account currently runs php 4.x
    I presume there is a parameter somewhere which allows to switch to php5 either at the whole site level or at some subdirectory level (eg, with some adequate htaccess).

    Where? How?

    Thx for the help

  2. #2
    StephenJ's Avatar
    StephenJ is offline Member
    Join Date
    Mar 2008
    Location
    Legana, Tasmania, Australia
    Posts
    87
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    In cPanel there is a PHP Configuration button. If you go to that there is a drop down list where you can choose 4 or 5.

  3. #3
    Alan B's Avatar
    Alan B is offline Super Moderator
    Join Date
    Jul 2007
    Location
    Toronto, Canada
    Posts
    1,382
    WHB Points this Month
    0.00
    WHB Points
    290.00
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default

    Probably the cPanel option just creates the htaccess entry for you. If you have several accounts to change, it's likely quicker for you to just upload the htaccess entry rather than use the cPanel function.

  4. #4
    djogit is offline New Bee
    Join Date
    Jul 2008
    Posts
    6
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi everyone,
    There's no dropdown list to switch php version from 4 to 5 or vice versa. I'd like to have the switch from cpanel or might be to use PHP5 for all sites hosted. How can I do that? thanks in advance

  5. #5
    Elena O.'s Avatar
    Elena O. is offline Administrator
    Join Date
    Jul 2007
    Posts
    140
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    If you would like your php application to be run on php5, it can be enabled by creating a .htaccess file and adding this line to it.

    AddHandler application/x-httpd-php5 .php .php4 .php3 .phtml
    Elena O.
    General Manager
    WebHostingBuzz.com

    Get the latest news and promotions by following us on Twitter and Facebook

  6. #6
    djogit is offline New Bee
    Join Date
    Jul 2008
    Posts
    6
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    @Elena I know how to do that for each website hosted. What I mean was how to configure php version from WHM. Yesterday, my client wants to have drop down list on "CPanel" > "PHP configuration" with any PHP version supported where they can select which PHP version they would like to use. When I looked at CPanel > PHP Configuration, It's default only and no options to select the PHP version. I see my other cpanels have php version options available where I can select any PHP version (4 or 5) without writing the AddHandler to the .htaccess. this might be easier for clients since sometimes they will forget to add the addHandler line. Thanks

  7. #7
    Fibo_fr's Avatar
    Fibo_fr is offline New Bee
    Join Date
    Jul 2008
    Posts
    4
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking

    Quote Originally Posted by Elena O. View Post
    If you would like your php application to be run on php5, it can be enabled by creating a .htaccess file and adding this line to it.

    AddHandler application/x-httpd-php5 .php .php4 .php3 .phtml
    Thx, this is the quick shot I was looking for.
    Of course, having a cpanel button that would work "accountwide" would be great... but there are some chances that this would somehow kill some existing php4 which would then just crash without warning...

  8. #8
    omniuni's Avatar
    omniuni is offline Jewbergeek!
    Join Date
    Jul 2007
    Posts
    181
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I had this happen to me. I just changed the file extensions.

    e.g. my *.php files became *.php5 or whatnot. It should work to do a *.php4
    [URL="http://d-site.net"]http://d-site.net/[/URL]

+ Reply to Thread

Tags for this Thread

Posting Permissions

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