| PHP 5.3 for Kloxo [message #97796] |
Sun, 22 April 2012 14:52  |
|
If you want to test out using PHP 5.3 test out the following.
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 ius-release-1.0-10.ius.el5.noarch.rpm
rpm -i epel-release-5-4.noarch.rpm
yum -y remove php php-common
yum -y install php53u php53u-cli php53u-devel php53u-gd php53u-imap php53u-mbstring php53u-mysql php53u-pdo php53u-pear php53u-xml
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 will have to edit some Kloxo code so it better detects PHP's version.
In /usr/local/lxlabs/kloxo/httpdocs/htmllib/lib/lib.php
change:
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;
}
to
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;
}
php -v should give you this output:
Cannot load Zend Extension Manager - it was built with configuration 1.2.0, whereas running engine is API220090626,NTS
PHP 5.3.10 (cli) (built: Feb 2 2012 17:34:38)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with the ionCube PHP Loader v4.0.14, Copyright (c) 2002-2011, by ionCube Ltd.
I haven't looked further into that error yet.
You'll need to go to the PHP COnfiguration page in Kloxo for the changes to take effect.
https://www.mercuryvps.com
HyperVM Xen VPS hosting
[Updated on: Sun, 22 April 2012 14:54] Report message to a moderator
|
|
|
| Re: PHP 5.3 for Kloxo [message #97818 is a reply to message #97796] |
Tue, 24 April 2012 03:20   |
|
Hi Shazar,
I tried your suggested upgrade process on two different VPS servers and the results are somehow different on those servers.
On one server php was upgraded to version 5.3.3. On another server php was upgraded to 5.3.10. I have to say that both servers had exactly the same starting configuration.
I also noticed that suphp is not working at all. I tried to remove suphp with yum and install new version from the source code but it just doesn't work.
Can you please try to explain how to make suphp to work correctly with new version of php? Or any other secure mod for apache. Without this feature, hosting any kind of php system (for example Joomla) doesn't make sense on such environment
Thank you very much for this tutorial. Can you please try to extend it to work correctly with the secure environment?
Thank you in advance!
|
|
|
| Re: PHP 5.3 for Kloxo [message #97821 is a reply to message #97818] |
Tue, 24 April 2012 08:52   |
|
Well I am only working on this with mod_php, though I am working to secure it. This PHP process is an extension of my work on a new apache driver that uses the mpm-itk which provides running php per user. Also I will be adding some more things in to allow all of the configurations in Kloxo to be hard set and unchangable by the users even with mod_php. Some of these settings include the max memory and disabled functions. Sorry that I can't do anything with the suphp portion of this. If you want to test out the full driver that I am working on, you can send me a PM as I requested in my other thread regarding the driver.
https://www.mercuryvps.com
HyperVM Xen VPS hosting
|
|
|
|
| Re: PHP 5.3 for Kloxo [message #98134 is a reply to message #97825] |
Sat, 12 May 2012 11:18   |
Spacedust  Messages: 1233 Registered: October 2007 Location: Poland |
Senior Master |
|
|
I'm using ruid2 with PHP 5.4.3 from remi-repo. Works great.
PHP 5.4.3 (cli) (built: May 9 2012 17:03:20)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with TrueBug PHP Loader v1.2.0, Copyright (c) 2006-2011, by TrueBug Software
with the ionCube PHP Loader v4.1.0, Copyright (c) 2002-2012, by ionCube Ltd.
[Updated on: Sat, 12 May 2012 11:26] Report message to a moderator
|
|
|
| Re: PHP 5.3 for Kloxo [message #98147 is a reply to message #98134] |
Sun, 13 May 2012 09:29   |
|
But again Spacedust, you've half-assed it. Kloxo will not find it as version 5.4 for certain things. I told you how you can patch this temporarily, but you ignored me. I do plan to add the version checking change to Kloxo, once thoroughly tested.
https://www.mercuryvps.com
HyperVM Xen VPS hosting
|
|
|
| Re: PHP 5.3 for Kloxo [message #98150 is a reply to message #98134] |
Sun, 13 May 2012 16:58   |
|
Spacedust wrote on Sat, 12 May 2012 17:18I'm using ruid2 with PHP 5.4.3 from remi-repo. Works great.
PHP 5.4.3 (cli) (built: May 9 2012 17:03:20)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with TrueBug PHP Loader v1.2.0, Copyright (c) 2006-2011, by TrueBug Software
with the ionCube PHP Loader v4.1.0, Copyright (c) 2002-2012, by ionCube Ltd.
Would you care to provide step by step instructions how you installed this and configured it to work correctly without a problem?
Thank you in advance!
|
|
|
|
|
| Re: PHP 5.3 for Kloxo [message #98261 is a reply to message #98219] |
Tue, 22 May 2012 03:51   |
|
Hi shazam and spacedust
Any updates on whats working and whats not ?
I really need a newer version of php cuase of some issues with current one, and i don't know which one of these to try ?
also is it possible to revert back in your releases to previous working version ?
looking forward for your answers
thanks
|
|
|
|
| Re: PHP 5.3 for Kloxo [message #98751 is a reply to message #98744] |
Wed, 20 June 2012 07:42   |
|
@ shazar - I install by your instructions PHP 5.3 but when I try php -v nothing is in output.
I install php 5.4 and it is working
Shazar if you say how to install PHP 5.3 I can test php on server (test server with 4 clients) and user will report problems.
|
|
|
| Re: PHP 5.3 for Kloxo [message #98753 is a reply to message #98751] |
Wed, 20 June 2012 07:47   |
|
Artis - Is there any indication of a failure in the instructions? I have run through these quite a few times with no problems. I would suggest starting from a fresh install of the OS and Kloxo and then trying my php 5.3 instructions line by line doing some checks to ensure that each line ran successfully.
https://www.mercuryvps.com
HyperVM Xen VPS hosting
|
|
|
|
| Re: PHP 5.3 for Kloxo [message #98786 is a reply to message #98756] |
Thu, 21 June 2012 08:18   |
|
Here i have problem
[root@Server ~]# rpm -i ius-release-1.0-10.ius.el5.noarch.rpm
warning: ius-release-1.0-10.ius.el5.noarch.rpm: Header V4 DSA signature: NOKEY, key ID 9cd4953f
error: Failed dependencies:
epel-release is needed by ius-release-1.0-10.ius.el5.noarch
[root@Server ~]# rpm -i epel-release-5-4.noarch.rpm
warning: epel-release-5-4.noarch.rpm: Header V4 DSA signature: NOKEY, key ID 9cd4953f
[Updated on: Thu, 21 June 2012 08:18] Report message to a moderator
|
|
|
| Re: PHP 5.3 for Kloxo [message #98787 is a reply to message #98786] |
Thu, 21 June 2012 08:30   |
|
Artis - Sorry I have not tried 5.4 at all. My instructions are for 5.3. SpaceDust hijacked the thread a little sorry for the confusion. I will not be testing 5.4 anytime soon. Also if testing the Apache driver that I PMed you, please don't mix the testing.
https://www.mercuryvps.com
HyperVM Xen VPS hosting
|
|
|
| Re: PHP 5.3 for Kloxo [message #98788 is a reply to message #98787] |
Thu, 21 June 2012 08:37   |
|
This eror i get when i try to install PHP 5.3 from your instructions on the top of this topic.
I'm reinstalling my server now for appache testing, it will take about 2 hours because i must backup my clients first.
|
|
|
|
|
| Re: PHP 5.3 for Kloxo [message #98986 is a reply to message #98787] |
Sun, 01 July 2012 12:05   |
Spacedust  Messages: 1233 Registered: October 2007 Location: Poland |
Senior Master |
|
|
shazar wrote on Thu, 21 June 2012 14:30Artis - Sorry I have not tried 5.4 at all. My instructions are for 5.3. SpaceDust hijacked the thread a little sorry for the confusion. I will not be testing 5.4 anytime soon. Also if testing the Apache driver that I PMed you, please don't mix the testing.
The same instructions are for PHP 5.3. Just don't use remi-test repo, but normal remi repo.
yum update php --enablerepo=remi
and change line in php.ini:
zend_extension=/usr/lib/kloxophp/ioncube/ioncube_loader_lin_5.3.so
[Updated on: Sun, 01 July 2012 12:05] Report message to a moderator
|
|
|
| Re: PHP 5.3 for Kloxo [message #98987 is a reply to message #98982] |
Sun, 01 July 2012 12:12   |
|
I think i have found :
not do :
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 ius-release-1.0-10.ius.el5.noarch.rpm
rpm -i epel-release-5-4.noarch.rpm
do :
sudo yum install yum-plugin-replace
but i see :
package php is not installed
in Compoment Info, and php is red.
and with php -v :
Quote:Cannot load Zend Extension Manager - it was built with configuration 1.2.0, whereas running engine is API220090
626,NTS
PHP 5.3.14 (cli) (built: Jun 25 2012 11:39:59)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with the ionCube PHP Loader v4.0.14, Copyright (c) 2002-2011, by ionCube Ltd.
[Updated on: Sun, 01 July 2012 12:16] Report message to a moderator
|
|
|
|
|
|
| Re: PHP 5.3 for Kloxo [message #98996 is a reply to message #98995] |
Sun, 01 July 2012 17:04   |
|
If still want installed, follow this step:
1. Uninstall/disable xcache, ioncube and zend from 'php config' on kloxo panel
2. create /etc/yum.repos.d/atomic.repo with content:
[atomic]
name=atomic - atomicrocketturtle.com
baseurl=http://www.atomicorp.com/channels/atomic/centos/5/$basearch/
enabled=1
gpgcheck=0
includepkgs=mod_ruid* php-zend*
3. install one-by-one depend on what you want:
yum install php53u-xcache
yum install php-zend-guard-loader
yum install php53u-ioncube-loader
yum install php53u-xcache
yum install php53u-suhosin
[Updated on: Sun, 01 July 2012 17:40] Report message to a moderator
|
|
|
|
|
|
| Re: PHP 5.3 for Kloxo [message #99000 is a reply to message #98999] |
Sun, 01 July 2012 18:27   |
|
1. It's because ius not serve zend-guard, so must taken from atomic
2. if using xcache, zend and ioncue, don't change setting on 'php config' except disable for them. It's because kloxo have their own package and not compatible with php 5.3
3. zend-guard is zend-optimizer but for php 5.3+
[Updated on: Sun, 01 July 2012 18:31] Report message to a moderator
|
|
|
| Re: PHP 5.3 for Kloxo [message #99003 is a reply to message #99000] |
Mon, 02 July 2012 00:50   |
|
Ok thanks !
I have seen our modification, but "php-zend-guard-loader" it's good?
what do it do ? what is their utilities exactly ?
I see mod_ruid, what is it ? and what is mod_php and other exactly ?
And, do you know how kloxo can see php 5.3 in Component Info ?
To do the upgrade, before i used "rpm -qa | grep -i php" but how can i check update and update php and his package ?
Sorry to all this question, i try to understand perfectly ^^.
[Updated on: Mon, 02 July 2012 00:52] Report message to a moderator
|
|
|
| Re: PHP 5.3 for Kloxo [message #99005 is a reply to message #99003] |
Mon, 02 July 2012 04:00   |
|
Ioncube and zend only needed when we are using php encyption code (payed apps like cpanel, directadmin). If we are using open-source only we don't need ioncube and zend.
Kloxo (until current version; 6.1.12) using 'special' ioncube and zend. So, disabling it from kloxo panel make kloxo not handle them. And then we need manual install when need ioncube and zend. Also because ioncube and zend from kloxo not compatible for php 5.3+.
If using php from ius, php upgrade with command 'yum upgrade php53u' (except for zend-guard; need 'yum upgrade php-zend-guard-loader).
|
|
|
| Re: PHP 5.3 for Kloxo [message #99011 is a reply to message #99005] |
Mon, 02 July 2012 12:33   |
|
Ok. Perfect !
And to Php Type (in webserver config on kloxo), how can i choose ? with kloxo again ? and what is their difference exactly ?
In php config on kloxo, in Advanced PHP Config, can i change this configuration or i must do other way ?
Thanks,
Friendly,
Florian
|
|
|
| Re: PHP 5.3 for Kloxo [message #99013 is a reply to message #99011] |
Mon, 02 July 2012 13:08   |
|
All facilities still work except you must set disable xcache, zend and ioncube (and then install manually). In this current version, using suphp (select on 'webserver config') always using php 5.2. Need modified kloxo code. But, you can selet mod_php_ruid2 as alternative.
|
|
|
|
| Re: PHP 5.3 for Kloxo [message #99020 is a reply to message #99015] |
Mon, 02 July 2012 23:02   |
|
florian26 wrote on Tue, 03 July 2012 01:05Ok. Thanks.
I use mod_php, it's good ? and what is their difference betwen suphp / suphp_worker / suphp_event / mod_php / mod_php_ruid2 / mod_php_itk ?
Use mod_php_ruid2 because speed like mod_php and secure. Also minimize ftp issue.
|
|
|
|
| Re: PHP 5.3 for Kloxo [message #99041 is a reply to message #99036] |
Tue, 03 July 2012 07:31   |
|
Spacedust wrote on Tue, 03 July 2012 18:08mustafaramadhan wrote on Tue, 03 July 2012 05:02florian26 wrote on Tue, 03 July 2012 01:05Ok. Thanks.
I use mod_php, it's good ? and what is their difference betwen suphp / suphp_worker / suphp_event / mod_php / mod_php_ruid2 / mod_php_itk ?
Use mod_php_ruid2 because speed like mod_php and secure. Also minimize ftp issue.
mod_php_ruid2 works ok till version 0.9.4. All newer editions are causing very high system load. Can you test this Mustafa ?
Not testing because more focus/interest to optimizing php-fpm (in context httpd and nginx-proxy).
For using php-fpm, apache-optimize not importance but need optimize for php-fpm.
For mod_php_ruid2 (also other mod_php), optimize value for 'max_children' is around 10 (on 512 MB ram). Nothing problem 'max_children' until around 40 for php-fpm. Speed near equal for the same 'max_children' value.
[Updated on: Tue, 03 July 2012 07:37] Report message to a moderator
|
|
|
|
|
| Re: PHP 5.3 for Kloxo [message #99078 is a reply to message #99070] |
Wed, 04 July 2012 01:45   |
|
Spacedust wrote on Wed, 04 July 2012 04:44Can you tell me if php-fpm shows script path instead of /usr/sbin/httpd when your run top and press c just like php-cgi on lighttpd ?
Example when select 'running process' on webmin for nginx-proxy (select php-fpm_event on 'webserver confing' for httpd):

Note:
- We can see 5 php-fpm instances because my fork setting max_children always as 5.
- On php 5.2, php-fpm instance only for 'static' but have 'static', 'dynamic' and 'ondemand' for php 5.3.3+
[Updated on: Wed, 04 July 2012 01:54] Report message to a moderator
|
|
|