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.

Upgrade PHP / MySQL / Apache - Pros/Cons/Pitfalls/Compabitility

Discussion in 'EasyApache' started by mtindor, Oct 17, 2007.

  1. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    There are a gazillion threads about upgradnig PHP and|or MySQL and|or Apache. The threads are spread out and some are 10 or more pages long. It'd be nice if somebody would comment in new threads on their experiences with upgrading various things.

    MySQL
    - what problems can one expect when upgrading from 4.1.xx to 5.0.xx ?
    - what is likely to break as far as customer scripts / Fantastico / etc?

    PHP
    - what problems can one expect when upgrading from 4.4.x to 5.2.x
    - 5.2.1 through 5.2.4 are available through EasyApache updating

    What versions of PHP 5.2.x are known to work/not work with things like EAccelerator, Zend Optimizer, Ioncube

    Any problems with Fantastico after a PHP5 upgrade?

    APACHE
    - what problems can one expect when upgrading from 1.3.3x to 2.0x or 2.2x
    - on a server with 150 domains, most using PHP / MySQL / a lot of forum software, is it going to be a nightmare upgrading to 2.x?

    I'm currently running MySQL 5.0.2x on two machines with Apache 1.3.37|39 and PHP 4.4.7 - Those two machines have 1 site on one and 15 on another. PHP / MySQL is only in use on about half of the 16 total sites. I haven't had any problem upgrading to MySQL 5.0.2x on those two.

    I have one server running Apache 1.3.37, PHP 4.4.7 and MySQL 4.1.22 (with 150 domains).

    Would like to know what people think are the proper steps to take - what should be upgraded first? what _needs_ to be upgraded and what can stay as is for long term? what steps would one take beforehand in updating any/all of these things.

    I certainly don't plan on attempting to update any machine to Apache 2.x any time soon unless it's the machine with 1 domain, for testing purposes. But for MySQL and PHP I am concerned about upgrading because I feel the need. Just had a specific customer asking for MySQL 5.x support, and with the PHP4 EOL I feel the need to be making a move upgrading that as well.

    Pros/Cons/Pitfalls to watch for.... anything would be great.

    Oh - while I"m on the subject, how about running concurrent PHP4/PHP5 with EA3. Is this pretty much a no-brainer easy thing to do? I'd consider running PHP4/5 concurrent if PHP4 were the 'default' and PHP5 was able to be an option via an addition of something to a customers .htaccess file. I'd never want to tell a customer that they must rename their PHP scripts to .php4 to get them to work - try that with a major bulletin board software and you'll find it won't be pretty. Ideally I'd like to be able to have PHP4 (or PHP5) as default and then if a customer needs PHP4 or PHP5 specifically and it isn't the default, then they could add something to .htaccess to parse _their_ .php files through the version of PHP that they need.

    If you run PHP4/5 concurrent, can both run SuPHP? Can both run Zend/Ioncube? How are the configurations for the two separated?

    Yes, a lot of questions - but I think many of the readers here (including myself) would be well served by one or more new threads discussing the suitability of PHP5 / Apache 2.x / MySQL 5.x on a Cpanel machine now, versus a year or more ago when some of the threads were started and there were a lot more problems.

    Mike
     
  2. jenlepp

    jenlepp Well-Known Member

    Joined:
    Jul 4, 2005
    Messages:
    116
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Liberty Hill, TX
    cPanel Access Level:
    DataCenter Provider
    I upgraded PHP to 5, left Apache alone for the moment, and Fantastico's been down 3 days on the server. I suspect it's an ioncube issue since my server's 64 bit, but neither I or the NOC can figure it out, and tickets have been submitted to both cPanel and Fantastico.

    Despite all these brainiacs looking, my one production server still does not have Fantastico, and I am not exactly what you would call "pleased". :)
     
    PPNSteve likes this.
  3. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    I didn't remember Fantastico needing Ioncube, but maybe so. At any rate, it should be no problem to just reinstall Ioncube.

    Ioncube comes with various loaders, for the various versions of PHP. If you had PHP4, then your php.ini file had a line similar to this:

    zend_extension = /usr/local/ioncube/ioncube_loader_lin_4.4.so

    You'll want to change that to:

    zend_extension = /usr/local/ioncube_loader_lin_5.2.so

    NOTE: Your path to ioncube mayb e different than above - your php.ini file would have that.

    If you're running ONLY PHP5, then your php.ini is in /usr/local/Zend/etc/php.ini (assuming you have Zend installed). You should reinstall Zend while your at it anyway using /scripts/installzendopt

    If you do a 'php -m' from a shell prompt you should see something like this as part of the output:
    [Zend Modules]
    Zend Extension Manager
    Zend Optimizer
    the ionCube PHP Loader

    And php -v should reveal something like:
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with the ionCube PHP Loader v3.1.32, Copyright (c) 2002-2007, by ionCube Ltd., and
    with Zend Extension Manager v1.2.0, Copyright (c) 2003-2006, by Zend Technologies
    with Zend Optimizer v3.2.2, Copyright (c) 1998-2006, by Zend Technologies

    I would recommend:
    1. reinstalling Zend - /scripts/installzendopt
    2. update ioncube loader if you have it so that the line in the php.ini points to the right version of ioncube for your PHP. I'm assuming you installed PHP 5.2.x so you would use one that ends with ioncube_loader_lin_5.2.so

    For #2 you can always go grab a fresh tar.gz from http://www.ioncube.com/loaders.php for your particular architechture/os - follow its instructions, then make sure the only line that is in your php.ini which references ioncube is one that references the right path and loader for your version of php.

    PS: On the last machine I installed PHP5, I installed 5.2.3 - simply because there was some extension that supposedly doesn't work properly with 5.2.4. I don't know if its Zend or Ioncube or something else - but if worse comes to worse, make sure you aren't running 5.2.4 but instead compile 5.2.3 if you still can't get it to work using the above info.

    Mike
     
  4. jenlepp

    jenlepp Well-Known Member

    Joined:
    Jul 4, 2005
    Messages:
    116
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Liberty Hill, TX
    cPanel Access Level:
    DataCenter Provider
    Thing is, I have all the encoders right (or so it seems) - I'm running several PHP scripts on my own site that use the loaders, and I'm not having a problem with it. I checked cPanel's PHP (since it runs its own) and it appears to the pointing to the correct loaders as well. I have ioncube checked in whm, and cPanel loads up just fine. Just not Fantastico, with the same error above.

    Off /usr/local/cpanel/3rdparty/fantastico/loaders I have:

    drwxr-xr-x 4 root root 4096 Apr 27 08:57 ./
    drwxr-xr-x 8 root root 12288 Oct 18 15:06 ../
    drwxr-xr-x 2 root root 4096 Apr 27 08:57 64/
    drwxr-xr-x 2 root root 4096 Apr 27 08:57 AMD64/
    -rwxr-xr-x 1 root root 283060 Feb 22 2007 ioncube_loader_fre_4.1.so*
    -rwxr-xr-x 1 root root 278004 Feb 22 2007 ioncube_loader_fre_4.2.so*
    -rwxr-xr-x 1 root root 278484 Feb 22 2007 ioncube_loader_fre_4.3.so*
    -rwxr-xr-x 1 root root 289972 Feb 22 2007 ioncube_loader_fre_4.3_ts.so*
    -rwxr-xr-x 1 root root 280628 Feb 22 2007 ioncube_loader_fre_4.4.so*
    -rwxr-xr-x 1 root root 293076 Feb 22 2007 ioncube_loader_fre_4.4_ts.so*
    -rwxr-xr-x 1 root root 266996 Feb 22 2007 ioncube_loader_fre_5.0.so*
    -rwxr-xr-x 1 root root 273588 Feb 22 2007 ioncube_loader_fre_5.0_ts.so*
    -rwxr-xr-x 1 root root 738292 Feb 22 2007 ioncube_loader_fre_5.1.so*
    -rwxr-xr-x 1 root root 759988 Feb 22 2007 ioncube_loader_fre_5.1_ts.so*
    -rwxr-xr-x 1 root root 730868 Feb 22 2007 ioncube_loader_fre_5.2.so*
    -rwxr-xr-x 1 root root 760500 Feb 22 2007 ioncube_loader_fre_5.2_ts.so*
    -rwxr-xr-x 1 root root 299428 Feb 21 2007 ioncube_loader_lin_4.1.so*
    -rwxr-xr-x 1 root root 292452 Feb 21 2007 ioncube_loader_lin_4.2.so*
    -rwxr-xr-x 1 root root 302340 Feb 21 2007 ioncube_loader_lin_4.2_ts.so*
    -rwxr-xr-x 1 root root 292772 Feb 21 2007 ioncube_loader_lin_4.3.so*
    -rwxr-xr-x 1 root root 302756 Feb 21 2007 ioncube_loader_lin_4.3_ts.so*
    -rwxr-xr-x 1 root root 298212 Feb 21 2007 ioncube_loader_lin_4.4.so*
    -rwxr-xr-x 1 root root 308452 Feb 21 2007 ioncube_loader_lin_4.4_ts.so*
    -rwxr-xr-x 1 root root 282500 Feb 21 2007 ioncube_loader_lin_5.0.so*
    -rwxr-xr-x 1 root root 291812 Feb 21 2007 ioncube_loader_lin_5.0_ts.so*
    -rwxr-xr-x 1 root root 1010948 Feb 21 2007 ioncube_loader_lin_5.1.so*
    -rwxr-xr-x 1 root root 1058820 Feb 21 2007 ioncube_loader_lin_5.1_ts.so*
    -rwxr-xr-x 1 root root 870880 Oct 20 09:42 ioncube_loader_lin_5.2.so*
    -rwxr-xr-x 1 root root 919584 Oct 20 09:42 ioncube_loader_lin_5.2_ts.so*
    root@warturtle [/usr/local/cpanel/3rdparty/fantastico/loaders]#

    My system is 64 bit and I suspect that just Fantastico is loading the wrong loaders. php -m gives me:

    [Zend Modules]
    Zend Extension Manager
    Zend Optimizer
    the ionCube PHP Loader

    and php -v

    PHP 5.2.4 (cli) (built: Oct 17 2007 09:45:55)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    with the ionCube PHP Loader v3.1.31, Copyright (c) 2002-2007, by ionCube Ltd., and
    with Zend Extension Manager v1.2.0, Copyright (c) 2003-2006, by Zend Technologies
    with Suhosin v0.9.20, Copyright (c) 2002-2006, by Hardened-PHP Project
    with Zend Optimizer v3.2.2, Copyright (c) 1998-2006, by Zend Technologies

    so everything looks ok. I am running 4.X and 5.X, but everything but Fantastico, even things with loaders required, seems to be runing a-ok.

    I may go down to 5.2.3 and see if that makes a difference.
     
  5. PPNSteve

    PPNSteve Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Somewhere in Ilex Forest
    cPanel Access Level:
    Root Administrator
    Twitter:
    root@wobbuffet-202 [/]# php -v
    /usr/local/lib/php/extensions/no-debug-non-zts-20050922/ioncube/ioncube_loader_lin_5.2.so doesn't appear to be a valid Zend extension
    /usr/local/Zend/lib/ZendExtensionManager.so doesn't appear to be a valid Zend extension
    PHP 5.2.4 (cli) (built: Oct 25 2007 05:08:27)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies


    something's NOT right here.. zend isn't loading (it's been reinstalled just to be sure) and php refuses to see the ioncube loader as valid.

    some help please.. we need to get the ioncube loader working ASAP.

    edit: upon further testing, php 5.2.4 fails with both ionCube and zend. re-compiling to 5.2.3 seems to allow them to work.

    still there should be one post / page / howto set up for us to use so that we don't have to experiment on our production servers.
     
    #5 PPNSteve, Oct 25, 2007
    Last edited: Oct 25, 2007
Loading...

Share This Page