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.

php4 + php5

Discussion in 'General Discussion' started by BlakeM, Sep 6, 2007.

  1. BlakeM

    BlakeM Registered

    Joined:
    Sep 6, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hello, I have php 4.4.7 on my server, I need a tutorial on how to install php 5 with php 4 still installed. So that way I can change the line in htaccess so that way different sites can run php 4 or 5
     
  2. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    You'll need ea3 to make this easy.. The CURRENT build should be out next week.
     
  3. fleksi

    fleksi Well-Known Member

    Joined:
    Sep 17, 2003
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
  4. ispro

    ispro Well-Known Member

    Joined:
    Apr 8, 2004
    Messages:
    628
    Likes Received:
    1
    Trophy Points:
    18
    Btw, I have wrote that HOWTO.
    If you need, I may install you with PHP4 as secondary PHP (for those with old scripts) while having PHP5 as main PHP (either via phpsuexec or as CGI).

    PM for details as it is not Ads forum.
     
  5. MACscr

    MACscr Well-Known Member

    Joined:
    Sep 30, 2003
    Messages:
    190
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    The new easy apache 3 gives the impression that you can have the option of running php5 and php4 at the same time, but during the configuration, I didnt see the option to do both. Did i miss something?
     
  6. 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
    On the screen Profile :: Apache :: PHP Main check both the PHP 4 and PHP 5 to run both simultaneously.
     
  7. MACscr

    MACscr Well-Known Member

    Joined:
    Sep 30, 2003
    Messages:
    190
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hmm, i didnt see that option, will look again. Can this still be done if im using FastCGI and suPHP?
     
  8. trevHCS

    trevHCS Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    69
    Likes Received:
    1
    Trophy Points:
    8
    If you did run both, how would you tell the correct one to run your script? Interesting idea I must admit.

    Trev
     
  9. MACscr

    MACscr Well-Known Member

    Joined:
    Sep 30, 2003
    Messages:
    190
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Trev,

    People have been running php4 and php5 at the same time for a couple years now, it just wasnt officially supported by cpanel. Whatever php version is set as the secondary, you can either use .php4 (when php4 is secondary) to use it or setup an htaccess file in that folder that sets AddType to use that particular version of php for all php files in that directory.
     
  10. trevHCS

    trevHCS Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    69
    Likes Received:
    1
    Trophy Points:
    8
    Ah, now that makes a load of sense...! Not entirely sure why anyone would want to do it mind you, but I'm sure there are good reasons to keep scripts in the dark ages. :)

    Trev
     
  11. bsasninja

    bsasninja Well-Known Member

    Joined:
    Sep 2, 2004
    Messages:
    528
    Likes Received:
    0
    Trophy Points:
    16
    Having two php version would not cause server overload??
     
  12. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    ea3 (EDGE and CURRENT) you can select PHP4 and PHP5 from the UI.

    At the end of the build it tells you where you can go to configure how both PHPs are setup to work.

    Any options that don't mix will likley error out the build process and know requirements and conflict are setup in a dependency algorythm. If we come across new one we can add them quickly.
     
  13. bsasninja

    bsasninja Well-Known Member

    Joined:
    Sep 2, 2004
    Messages:
    528
    Likes Received:
    0
    Trophy Points:
    16
    I ask my question again, Having two php version would not cause server overload?? How does it impact on server performance??
     
  14. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    As far as apache goes, its just another module so the question doesn't really make sense. Performance depends on how much either one is used and in what way.

    For example by means of hyperbole:

    Having PHP4 and PHP5 with no one using PHP will not use too many resources vs. having PHP4 and PHP5 with 1,000,000 users each running an imap webclient on their sites being heavly accessed will have exponentially more resources being used.

    In other words simply having both should not add to much besides a bigger footprint for apache since there is one more module.
     
  15. MaraBlue

    MaraBlue Well-Known Member

    Joined:
    May 3, 2005
    Messages:
    335
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Carmichael, CA
    cPanel Access Level:
    Root Administrator
    I doubt anyone wants to "keep [their] scripts in the dark ages", it's more a question of making sure everything works during the transition. That and there is plenty of software that's not PHP5 compliant yet, that many website owners and web hosts depend on.

    There's also an emerging number of products that *only* work on PHP5. That would be reason alone to run both. It seems to me 5 should be backward complaint, but I guess not.

    It's a lot like XP vs Vista.
     
  16. 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
    It is and it isn't. Not as bad as XP vs. Vista, I think XP and 2000 would be a better analogy. About 95% of the functions work as intended, but the 5% which make you scratch your head in PHP 4 and go "what the heck were they thinking?" - well when they improved that stuff in PHP 5, it broke compatibility with PHP 4.
     
  17. trevHCS

    trevHCS Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    69
    Likes Received:
    1
    Trophy Points:
    8
    If you think PHP4 -> PHP5 is bad, have you seen some of the stuff in PHP6 which although it was only proposals at the time looked like it could seriously break stuff. Guess by then however we'll all be using PHP5.

    Then again, I know a very large hotel booking site that until about 6 months ago was running on PHP3. Guess maybe if it's not broken, but imagine the restrictions.

    It was interesting to see them switch to ASP and everything break for a week...I could have told them that wouldn't work, for an appropriate fee. ;)

    Trev
     
  18. MaraBlue

    MaraBlue Well-Known Member

    Joined:
    May 3, 2005
    Messages:
    335
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Carmichael, CA
    cPanel Access Level:
    Root Administrator
    I'll let you know what I think in a week or so if I agree with your analogy :)

    I was probably the last W2KPro hold-outs until May of this year when I switched to XP Pro. Much as I didn't want to...I like XP a lot, and didn't find the transition difficult at all.

    Vista, on the other hand....*grits teeth* I just bought a new desktop last weekend. If a retail version of XP wasn't $299, Vista would be ripped out from the roots.


    Like how memory is handled...yes :) I just read that osCommerce breaks in 5, as does some WordPress plugins, SMF forums, Mediawiki, Zen cart...

    This kind of hassle is what I'm trying to avoid:
    http://www.dreamhoststatus.com/2007/02/08/php5-issues/

    My life has enough stress already, out of the box.

    Now granted that thread from Dreamhost happened 7 months ago, and the affected software developers may have released patches or PHP5-compatible upgrades since then. But I'd rather not take that chance, since if/when things do break, as far as my clients are concerned, it's MY fault.

    To me the most reasonable and safe (happy-customer-wise) solution is to run both side-by-side to ease the transition. And though I'm sure *some* of what's been written about the migration is "Chicken Little-ish", it can't *all* be. If it was an easy migration more hosts would have adopted PHP5 years ago.

    Don't get me wrong, I'm looking forward to seeing what 5 has under it's hood, kicking the tires and such. I just don't need any more major headaches and stuff breaking. I've had that happen often enough just going from one branch of 4.x to another (when I've hired "server management" techs who were hired for one specific task, but thought they were doing me a favor by changing the PHP version).
     
    #18 MaraBlue, Sep 27, 2007
    Last edited: Sep 27, 2007
  19. 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
    Hehe, the whole "we wont migrate until things don't break with PHP 5" and "we wont make things work with PHP 5 until hosts start supporting it" issue. That's the whole point of GoPHP5.org :).

    I agree, side-by-side is a great way of doing this. It gives a head's up to coders "Hey! We're discontinuing this soon, please upgrade!" without the disaster of spontaneously breaking hundreds of custom scripts in the process and forcing everyone to get under the hood of their code, rather than quickly rename .php to .php4 and deal with it later (but soon).
     
  20. MaraBlue

    MaraBlue Well-Known Member

    Joined:
    May 3, 2005
    Messages:
    335
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Carmichael, CA
    cPanel Access Level:
    Root Administrator
    See, I hear that and I keep going back to the XP vs Vista thing :) I just heard that M$ was offering owners of Vista's upper-end products special roll-back licenses to XP until they are "ready to upgrade to Vista." More like..until Vista is fully cooked.

    I think the developers of PHP could have made the "conversion docs" a lot more straight forward. I've read them, several times (and even when I *have* had sleep), and they seem vague (at least to me).

    If there was a list of exact functions/classes, a checklist, that would show exactly what won't work or may be a problem. It's the great unknown that people fear, not necessarily change in itself.

    Spontaneous breakage is NOT good, I speak from experience. I inadvertently upgraded to v11 tonight (ermmmm, early this morning). I was trying to upgrade a Perl module...and thought the commands I ran would keep me on v10. It didn't :)

    It's almost better this way, since I was really apprehensive about this particular upgrade (was planned for next weekend anyway), and had visions of massive spontaneous breakage.

    From what I've seen, v11 looks nice! And the best part...so far, nothing seems broken! Only one issue with the billing system, and since other apps have no problem connecting to their databases, I'm not sure that's even related to the upgrade. If it is, you're likely hear about it :) ***


    *** I take all that back. Our billing system relied on Ioncube loaders. I should have made this forum my first stop, rather than after I've tried everything else.
    *sigh*
     
    #20 MaraBlue, Oct 1, 2007
    Last edited: Oct 2, 2007
Loading...

Share This Page