whm/cpanel installs 3 php versions on your server

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,048
1
343
I noticed that I have 3 php version installed on all my cpanel servers

1) /usr/local/bin/php -v
PHP 5.1.4 (cli) (built: May 26 2006 03:29:01)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with Zend Extension Manager v1.0.10, Copyright (c) 2003-2006, by Zend Technologies
with Zend Optimizer v3.0.0, Copyright (c) 1998-2006, by Zend Technologies

2) /usr/bin/php -v
PHP 4.4.2 (cgi) (built: May 24 2006 03:28:09)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
with Zend Extension Manager v1.0.10, Copyright (c) 2003-2006, by Zend Technologies
with Zend Optimizer v3.0.0, Copyright (c) 1998-2006, by Zend Technologies

3!) /usr/local/cpanel/3rdparty/bin/php -v
PHP 4.4.2 (cgi) (built: Apr 27 2006 19:12:04)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
with the ionCube PHP Loader v3.0.7, Copyright (c) 2002-2005, by ionCube Ltd.


3 versions ! So , each time I restart apache 3 php versions are restarted eating a lot
of cpu and ram ....
Why 3 versions ?

1) is used by all users on /home .
2) I have no idea who is using it !!
3) it seems used by cpanel:2082 , each time I execute a php script inside
/usr/local/cpanel/base/frontend/skin .

Why 3 versions ? Is it not a lose of cpu , ram , disk space and more security risks ?
 

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,048
1
343
is it possible to have only 1 working php version for users and cpanel too ?
Anyone wrote an how to to remove all additional php versions and to have only 1 working php version ?

thank you
 

carluk

Well-Known Member
Sep 2, 2003
161
0
166
#3 is used by cpanel and #2 is cgi not cli.