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.

strange PHP behaviour after Apache upgrade in WHM

Discussion in 'EasyApache' started by SoftDux, Feb 26, 2007.

  1. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    Hi all

    I have upgraded Apache in WHM > Software > Apache Upgrade

    From here I chose PHP 5.0.5, and running a phpinfo page, http://www.softdux.com/phpinfo.php confirmed this.

    But, now I'm trying to install eaccelerator, and while I'm in SSH, php tells me it's v.4

    And it seems both are running as "cli". Can someone please assist me with this?
     
  2. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    That goes back to the versions where php doesnt actually update. This has to do with your mysql version. Downgrade to mysql 4.0 or 4.1 then your php5.05 will install fine then revert back to your desired mysql. There are many other work-arounds but this is the simplest.
     
  3. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    I'm using the MySQL from cPanel, didn't upgrade it, don't even know where / how to?
     
  4. picoleto

    picoleto Member

    Joined:
    Aug 8, 2006
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    If you plan on upgrading mysql/php you wanna update mysql first by doing the following

    log into WHM => Tweak Settings => MySQL = Choose version etc. => Save

    Normally I like to wait around 10-15 minutes after hitting save then run

    Code:
    /scripts/perlinstaller --force Bundle::DBD::mysql
    Not really optional, WHM is supposed to run this command when you hit save however there are some slight cases when it doesn't.

    After that just recompile Apache with PHP5

    if you're already at mysql5 and need to downgrade you might have to edit your /var/cpanel/cpanel.config

    search for mysql-version=

    http://forums.cpanel.net/showthread.php?t=52621&highlight=downgrade+mysql
     
    #4 picoleto, Feb 27, 2007
    Last edited: Feb 27, 2007
  5. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    MySQL 4.1 is ticket there. I don't want to upgrade downgrade MySQL, only PHP
     
  6. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    running php -v via SSH, I get this:


    And then, looking at the environment variables from the phpinfo() file:

    I have run the command you suggested, I updated to the latest RELEASE built, and then re-ran the Apache update, chooing PHP 5.0.5, which the phpinfo() page confirms, but not php -v in SSH, so I cannot install other stuff like eaccalerator, PHP JSON, PHP PECL Mailparse, etc.
     
  7. mctDarren

    mctDarren Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    664
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    New Jersey
    cPanel Access Level:
    Root Administrator
    I had this problem before on a development box, but can't remember exactly how I solved it. Do locate and find all binaries relating to php. Find the one that is truly php5 (run /usr/local/bin/php -v, /usr/bin/php -v, etc). Symlink all the others to that one that is truly php5. See how that works for you. It basically comes down to where shell is finding the php binary when you simply type "php -v". If your shell finds the old php4 binary in your path directory, it will run that first.

    Back then I believe I actually cleaned off EVERYTHING relating to php then reinstalled. The recompiled apache and things came back in check.
     
Loading...

Share This Page