Kloxo - upgrade PHP version to 5.3

Upgrade PHP version to 5.3

You can follow the steps shown below to upgrade your php version to 5.3 in Kloxo.

Download and install repository of PHP 5.3

# wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1.0-10.ius.el5.noarch.rpm
# wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/epel-release-5-4.noarch.rpm
# rpm -i epel-release-5-4.noarch.rpm
# rpm -i ius-release-1.0-10.ius.el5.noarch.rpm

Remove current PHP version from server.

# yum -y remove php php-common

Install New PHP version

# yum -y install php53u php53u-cli php53u-devel php53u-gd php53u-imap php53u-mbstring php53u-mysql php53u-pdo php53u-pear php53u-xml

Create a php.ini template for php5.3

# cp /usr/local/lxlabs/kloxo/file/phpini/php.ini.template-5.2 /usr/local/lxlabs/kloxo/file/phpini/php.ini.template-5.3
# chown -R lxlabs:lxlabs /usr/local/lxlabs/kloxo/file/phpini/php.ini.template-5.3

Then you  have to edit some Kloxo code to detects PHP's version.

Open the file '/usr/local/lxlabs/kloxo/httpdocs/htmllib/lib/lib.php' in any editor like nano or vi,

then change the following code from,

function find_php_version()
        global $global_dontlogshell;
        $global_dontlogshell = true;
        $ret = lxshell_output("rpm", "-q", "php");
        $ver =  substr($ret, strlen("php-"), 3);
        $global_dontlogshell = false;
        return $ver;



function find_php_version()
        global $global_dontlogshell;
        $global_dontlogshell = true;
        //Can't use lxshell_output because of the STDERR
        $ret = shell_exec('php -r \'echo phpversion();\' 2>nul');
        $ver =  substr($ret, 0, 3);
        $global_dontlogshell = false;
        return $ver;


Verify the new PHP version.

[root@mserver ~]# php -v
Cannot load Zend Extension Manager - it was built with configuration 1.2.0, whereas running engine is API220090626,NTS
PHP 5.3.23 (cli) (built: Mar 15 2013 10:46:06)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
    with the ionCube PHP Loader v4.0.14, Copyright (c) 2002-2011, by ionCube Ltd.

That's it....

2 thoughts on “Kloxo - upgrade PHP version to 5.3”

  1. what the side effects of the upgrade php and mysql kloxo? because I am using centos 5.6 is support for php 5.3 / 5.4 and mysql 5? while kloxo is not support in centos 6 .. please explanation

  2. Hello,

    I am sorry...I am not sure about the side effects. One of my client requested to upgrade the php version in his kloxo server. Need to monitor the issues out there.