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.

PHP5 good points, bad points?

Discussion in 'General Discussion' started by hm2k, May 11, 2007.

  1. hm2k

    hm2k Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    All of my servers currently run PHP4, I am looking to run PHP5.

    I am told that once I install PHP5 I cannot downgrade to PHP4 if I require, is this correct?

    I want to know the pros and cons of upgrading to PHP5, in terms of cPanel and users scripts to ensure everything will work correctly.

    Am I likely to have any problems?
     
  2. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    No that is not correct. You can easily revert to any php version you like. If you wait on easyapache to trickle down, I believe that will offer php4 and 5 simultaneously.

    As far as user scripts compatibility, no one can determine that. PHP5 has been around long enough that any modern script will run under it with no trouble. If you know you have clients with much older scripts, it may be a concern.

    Are you likely to have problems? that depends how many clients have broken scripts if any.
     
  3. hm2k

    hm2k Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for your reply.

    I am under the impression that PHP5 works best with apache2, yet as far as I am aware cPanel only works with apache1.

    Is this correct? (Please expand if you can)
     
    #3 hm2k, May 11, 2007
    Last edited: May 11, 2007
  4. hm2k

    hm2k Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Can I ask if this is from experience?

    Can I also ask if anyone else has experienced this without a problem?

    Thanks.
     
  5. slidenby

    slidenby Registered

    Joined:
    Feb 28, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    you can go back

    Yes, you can go back to any version of PHP without issue in CP. You can simply go in to your apache build and downgrade the same way you upgraded. As for PHP5 compatibility you need to check with the maintainers of any scripts you run to be sure they are 5 comp. Most scripts, I dare to say all good scripts, are. But, you should certainly check to make sure before you upgrade - you don't want to break anything you might currently be running. Simply check with the maintainers website of any software in question and check their requirements checklist.

    If it is things such as CMS packages you are concerned about, all the modern CMS's (Drupal, Joomla, Wordpress etc.) are fully compatible, and often greatly enhanced by running on a php5 platform. I honestly cannot think of a single program or script I run or have run in recent memory that is not PHP5 comp.

    Unless you are hosting other clients and are unaware of what scripts and programs they may be running, there is no downside to simply upgrading - and if you decide to go back, you could do so within a few clicks and a matter of moments with no harm done.

    However, if you are hosting other clients and websites and you do not have complete knowledge of what they are running, you should at the very least contact everyone and notify them of the impending upgrade.
     
  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
    cPanel 11 currently supports Apache 1.3, 2.0 and 2.2. However, I would recommend if you're not fond of doing Apache things manually, wait until Stage 2 of the cPanel 11 release for the new EasyApache which will make things much easier with regards to Apache 2/2.2.
     
  7. Daniel15

    Daniel15 Well-Known Member

    Joined:
    Oct 7, 2006
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    PHP 5 is quite a bit better than PHP 4 (new features, new extensions, etc.), and most scripts (if not all scripts) these days are fully compatible with it (actually, I tried a SMF 1.0 Beta release from 2003 and it worked without problems :P)

    As far as I know, PHP 5 works fine with either Apache 1.3 or 2.x :)
     
    #7 Daniel15, May 11, 2007
    Last edited: May 11, 2007
  8. Nhojohl

    Nhojohl Well-Known Member

    Joined:
    Nov 28, 2006
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    I currently run PHP 5 with Apache 1.3.37 and so far have had no problems at all. The only people who even write those articles about PHP 5 being a bad thing to upgrade are either people who are afraid to make the change or people who have no idea how to code a PHP script.

    I've yet to run across a script that wasn't PHP5 compatable.

    As for downgrading to PHP4, you definately don't even need to wait for EasyApache, re-configuring and building PHP is very, very easy.

    - John
     
  9. Daniel15

    Daniel15 Well-Known Member

    Joined:
    Oct 7, 2006
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    EasyApache is already here, and supports both PHP 4 and PHP 5 (but only supports Apache 1.3.37). The new EasyApache adds support for Apache 2.0 and 2.2, among other new features.
    To use EasyApache, there's two ways to use it:
    1) Log in via SSH, su to root, and then execute
    Code:
    /scripts/easyapache
    . You'll get a menu like this:
    Choose option 7.

    2) Log in to WHM as root, and click on the "Apache Update" option (under the "Software" heading)

    No matter which option you choose, the steps are very similar. Go down to "PHP Module", select it, and choose the version you'd like to use. Scroll down a bit, and enable any PHP modules you'd like to use (I'd suggest at least curl, MySQL, pspell, GD, Freetype and zlib). These are "modules" used by PHP scripts, and the ones I listed are the most common.

    If you're using SSH, "exiting" the menu will start the build. If you're in WHM, click on the "Start Build" button. Depending on the speed of your server, this should only take 5 minutes or so (and you will not experience any downtime, as Apache is only restarted once everything is done).

    /me points to http://d-e-f-i-n-i-t-e-l-y.com/ :D
     
  10. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Sounds like the user writing this thread has PHP confused with MySQL ...

    MySQL v5 is NOT easily backwards downgradable to MySQL v4

    MySQL v5 also still has a few compatibility issues with programs made for MySQL v4

    Reading this thread, I get the very strong impression that hm2k heard things
    about MySQL and got it confused with PHP which is a totally different subject!

    PHP v5 and v4 are independent of one another and you can run either the old
    version 4, the newer PHP verson 5 series, or even both at the same time and,
    unlike MySQL, there is absolutely no technical problem with downgrading back
    to PHP v4 from PHP v5 if you really wanted to do that.

    PHP v5 is fully backwards compatible to PHP v4 and all existing user scripts you
    currently have running under PHP v4 will work just fine under PHP v5.
     
Loading...

Share This Page