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 5 Support? PHP Team Announces PHP 4 No More Support

Discussion in 'General Discussion' started by kkobashi, Jul 15, 2007.

  1. kkobashi

    kkobashi Member

    Joined:
    Jul 15, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Do any versions of CPanel support PHP 5? I am running WHM 10.8 and CPanel 10.9.0 on Red Hat Enterprise.

    The PHP team announced this weekend that they are no longer supporting PHP 4.
     
  2. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    PHP 5 works just fine on all Cpanel development trees!
     
  3. kkobashi

    kkobashi Member

    Joined:
    Jul 15, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    How do I install PHP 5? I am running on Red Hat Enterprise with WHM/CPanel. I see a RPM package manager and PHP in there. But I cannot tell by looking at it what version it is.

    Can someone give me instructions on how to do this?

    Thank you!
     
  4. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    You have 4 main ways of installing PHP 5 ...

    1. Use the "Apache Update" feature in WHM

    2. Use "/scripts/easyapache" from a root SSH connection

    3. Download the source and compile manually (preferred way)

    4. Install the updated RPM from up2date (or yum as applicable)


    My personal choice and the one I find to be the easiest is to just download
    the source from php.net and compile it manually ....

    Create a page with phpinfo(); in it so you can get your current ./configure line

    Download the source from php.net and unpack
    Code:
    wget http://us2.php.net/get/php-5.2.3.tar.bz2/from/this/mirror
    tar jxvf php-5.2.3.tar.bz2
    cd php-5.2.3
    
    run "./configure" with the options you grabbed from your phpinfo screen
    and with whatever additions or deletions you want to make to the line

    Then just compile ...
    Code:
    make
    make test
    make install
    
     
  5. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    Is it really the best way?. I have about a dozen Freebsd boxes without Cpanel and we always build everything manually and love it that way because we can really get into the guts and trouble shoot anything. On our Cpanel boxes we always let the programs get
    done by the upcp, easyapache and other scripts.

    We all know that Cpanel puts its hooks into everything and has its own way of updating and controlling applications it uses that I think would break if you did your own installs by hand. I have seen this in Exim and Openssl myself and since Cpanel does so much manipulating of the httpd.conf and related files I was wondering how you manually compile apache/php when so much of it is non-standard from the out-of-the-box compile config that apache and php normally does.

    Is there a preferred "configure" statement for apache and php to keep things "cpanel friendly" ?
     
  6. kkobashi

    kkobashi Member

    Joined:
    Jul 15, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    The easiest way seems to be to just click on the Apache Update, :D

    There I can select the PHP version and modules to install and build. Then let it do its business.

    Thanks for the reply. Appreciate it.
     
  7. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Cpanel doesn't do anything special with PHP and unlike some of the other items
    you mentions such as "Exim" and "OpenSSL", PHP is totally independent of Cpanel.

    IE: Yes, you can compile your own PHP and that is 100% perfectly fine! ;)

    What "seems to be" and "what is actually" can be two totally different things ...

    I personally don't recommend WHM's "Apache Update" feature or it's SSH counterpart
    "/scripts/easyapache" script to upgrade PHP for 4 reasons:

    1. Both of those needlessly re-compile Apache when you are only trying to update PHP

    2. The sanity check on the PHP compiling by the Cpanel method is pathetic at best
    and routinely continues on happily despite the failed compile of PHP which can
    and often does result in a broken PHP setup after the upgrade has finished.

    3. Cpanel performs no "make test" verification of PHP once built.

    4. Cpanel's menus for upgrading PHP do not provide every configuration option
    possibility and simply lacks the range of configurability you have doing it yourself.

    Downloading and compiling your own source is easy and gives you more control
    to make sure that the installation or upgrade of PHP goes smoothly and allows
    you the opportunity to test and verify your compiled PHP binaries before actually
    committing them to installation.

    Now with all said, "Apache Update" and "/scripts/easyapache" are useful if you are
    planning on compiling or upgrading Apache but I would not use those programs just
    to simply upgrade PHP alone --- that's overkill, unreliable, and unnecessary.

    .
     
    #7 Spiral, Jul 16, 2007
    Last edited: Jul 16, 2007
  8. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    576
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mbelitar
    Now my php page have a problem :confused:

    On other thread i found that i must rename /usr/bin/php-cgi to /usr/bin/php and then my php page works.
     
  9. kkobashi

    kkobashi Member

    Joined:
    Jul 15, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    After running Apache update to upgrade to PHP 5, my system became hosed. Apache wouldn't run and according to a support rep, it had to do with a flawed module. So I am back at PHP version 4 still needing to upgrade to PHP 5.23. In addition a lot of my modules were take offline too like XSLT, DOM/XSLT, GD, etc. The sole purpose of why I am paying for cPanel license fees monthly is totally defeated! Not a happy camper here.:(
     
  10. Freezer

    Freezer Well-Known Member

    Joined:
    Jun 13, 2005
    Messages:
    120
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Den Haag
    cPanel isn't a subsitute for a server administrator. YOu shouldn't do things if you don't know how to do it...
     
  11. trhosting.net

    trhosting.net Well-Known Member

    Joined:
    Mar 7, 2006
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Turkey
    Apache update runs perfectly on cPanel. You can either compile php4 or php5. I recommend you to update php to 5.2.1 or 5.2.2. But if you want to use 5.2.3 then make a search on forums. You have to do a little customization for php 5.2.3 to work as cgi.
     
  12. kkobashi

    kkobashi Member

    Joined:
    Jul 15, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Huh? What are you talking about. What's so hard about clicking Php 5.23 in the Apache update screen and pressing the build button? What's there to not know how to do?

    If the software doesn't work (and I do pay for it monthly) what is a customer supposed to do? Defeat the entire purpose by resorting to manual means and just ignore that this thing has problems? I been a cPanel user for years. and never had a problem with it until today. Besides, upgrading PHP is a common issue. Why did this thing screw up my server and take it offline ? Most importantly, why didn't it work.

    Two clicks.. How much more dummy proof can it get and NOT work?
     
    #12 kkobashi, Jul 16, 2007
    Last edited: Jul 16, 2007
  13. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    For your information, upgrading PHP is one of the most basic kindergarten simple
    things to do as a server administrator of any server ...

    People who run into problems upgrading PHP generally speaking are usually
    only just those who don't know anything beyond their control panel menu and
    really not qualified enough to be running any server; the fact that many out
    there of this type are in fact running servers blind is really quite disturbing.

    Now with that said, I am going to have to go with Freezer's comment because
    Cpanel, Plesk, Ensim, or any other control panel software out there is NOT
    meant to be an all inclusive "manage all" for your server and should not be treated
    as such because there will always arise issues outside the bounds of what the
    control panel software can handle. Plus if you just take a look at security aspects
    alone, you'll find that none of the control panels setup any adequate security
    and those who rely totally on their software have the weakest security and
    most vulnerable and hackable servers on the internet.

    Now regarding upgrading PHP specifically ...

    I wouldn't use "Apache Update" in WHM or /scripts/easyapache in SSH to update PHP!

    Cpanel's tools for upgrading PHP have always been unreliable, often broken,
    never perform adequate sanity checks, and often make upgrading PHP more
    complicated than it need be. There is also the side annoyance of it recompiling
    Apache every time you just simply want to upgrade PHP only.

    For PHP, the best solution is almost always to just compile it from scratch
    which is really quite simple to do and gives you a lot more control and reliability ...

    1. Download and unpack the source from php.net

    2. Run ./configure with whatever options you want

    3. Make, make test, and then make install

    That's basically all there is to it!

    Regarding PHP 5.2.3, they changed the CGI binary name in that version from "php"
    to "php-cgi" and unless you update the binary name that is being called (OR) rename
    or symlink the file back to the original "php" name, your PHP will be broken when
    running phpSuExec or SuPHP.
     
Loading...

Share This Page