PHP as CLI and CGI when only CGI selected

suhailc

Verified User
Joined
Oct 4, 2004
Messages
119
Hmm,

On one of our servers, PHP was previously built with PHP 5 as CGI, and PHP 4 as CLI, but because PHP 5.2.5 is not compatible with Ioncube encoders, it was changed to PHP 4 as CGI, and PHP 5 as CLI.

However now it's currently got:

Code:
#PHP settings. default_php possible values - 4 or 5
default_php=4
php4_cli=no
php4_cgi=yes
php5_cli=no
php5_cgi=no
zend=yes
Yet after running
Code:
"./build php d"
I still see:

server4# php -v
PHP 5.2.5 (cli) (built: Feb 9 2008 18:51:04)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.2.8, Copyright (c) 1998-2007, by Zend Technologies
Any ideas?

Regards,
Suhail.
 

suhailc

Verified User
Joined
Oct 4, 2004
Messages
119
Hi Martynas,

So how can I only run one version of PHP, i.e. PHP 4 CGI with SuPHP?

Regards,
Suhail.
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
9,305
Location
LT, EU
Code:
php4_cgi=yes
And set the others to "no". Then run: "./build php n".
 

suhailc

Verified User
Joined
Oct 4, 2004
Messages
119
Code:
php4_cgi=yes
And set the others to "no". Then run: "./build php n".
Okay done, but I still see:

server4# php -v
PHP 4.4.8 (cli) (built: Feb 12 2008 20:59:44)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.2.8, Copyright (c) 1998-2007, by Zend Technologies
at the same time as:

server4# /usr/local/php4/bin/php -v
PHP 4.4.8 (cgi-fcgi) (built: Feb 12 2008 23:16:20)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
Additionally, how should Zend Optimizer be added to the PHP 4 CGI?

Regards,
Suhail.
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
9,305
Location
LT, EU
So, you have PHP4 as cgi. "/usr/local/php4/bin/php -v" shows it.
 
Top