HostOnNet Blog

2 Versions of PHP In Cpanel Server

In a Cpanel Server, there is 2 versions of PHP installed.

One is used by Apache for web sites hosted on the server. Other version is for Cpanel control panel. May be this PHP run as a privileged user, so that Cpanel have full access on the system.

# locate php|grep /bin/php
/usr/bin/php
/usr/local/bin/php
/usr/local/cpanel/3rdparty/bin/php
#

Cpanel internel version of PHP is /usr/local/cpanel/3rdparty/bin/php

Other two are same version, may be a copy.

# /usr/local/cpanel/3rdparty/bin/php -v
PHP 4.3.11 (cgi) (built: Sep 6 2005 22:07:19)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

# /usr/bin/php -v
PHP 4.3.9 (cgi) (built: Nov 8 2004 18:45:18)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
with Zend Extension Manager v1.0.4, Copyright (c) 2003-2004, by Zend Technologies
with Zend Optimizer v2.5.5, Copyright (c) 1998-2004, by Zend Technologies

# /usr/local/bin/php -v
PHP 4.3.9 (cli) (built: Nov 8 2004 18:40:48)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
with Zend Extension Manager v1.0.4, Copyright (c) 2003-2004, by Zend Technologies
with Zend Optimizer v2.5.5, Copyright (c) 1998-2004, by Zend Technologies

PHP used by Apache can be upgraded with

/scripts/easyapache

PHP used by Cpanel can be upgraded with

/scripts/makecpphp


Posted in Cpanel Server. Bookmark the permalink.