The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP 4 and PHP 5

Discussion in 'General Discussion' started by Monk707, Sep 20, 2007.

  1. Monk707

    Monk707 Registered

    Joined:
    Sep 20, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hi....is it possible to have multiple versions of php and mysql installed?

    For example one domain has php4 and mysql 4 and another account has php5 and mysql 5?

    Thanks in advance
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Multiple versions of PHP: Yes, but at this time only in the CURRENT and EDGE builds. This functionality will eventually propagate to the rest of our builds. To enable multiple versions of PHP, simply go to WHM -> Software -> Apache Update and when you get to Profile :: Apache :: PHP Main, check both PHP 4 and PHP 5.


    Multiple versions of MySQL: At this time, there is no way to do this via the cPanel/WHM interfaces. However, perhaps someone else here knows of a way to do this manually.
     
  3. ramprage

    ramprage Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    667
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    You can manually have the 2 versions going as well, even if its not in the WHM interface.
     
  4. hostparlor.com

    Joined:
    Sep 20, 2007
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    i believe your users can support php5 if they place

    AddType x-mapp-php5 .php
    AddHandler application/x-httpd-php5 .php
    AddHandler cgi-php5 .php

    in the .htaccess
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Note that on a cPanel/WHM system with EA3 compiling the dual PHPs that PHP 5 will be default version, PHP 4 being the secondary version.
     
  6. nsusa

    nsusa Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    93
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Colorado, USA
    How does the change described above affect existing websites? Let's say a user has a script that does not run on PHP5 - will he have to make a change or how does that work to access PHP4 for him?

    Chris
     
  7. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Keep in mind the vast majority of scripts will work in PHP 5 so scripts not working will be the exception, not the rule.

    End-users would just need to rename their PHP scripts from .php to .php4 until they can convert the script to work properly in PHP 5. Keep in mind a migration to PHP 5 is inevitable as PHP 4 reaches EOL on 8/8/8.
     
Loading...

Share This Page