Bugzilla – Bug 137443
PHP5 binary is CGI not CLI
Last modified: 2006-02-10 18:08:28 UTC
The is particularly bothersome for me as it breaks all my CLI PHP scripts (the CGI executes in the context of the target script's directory, not the current shell directory). tolan@twrk:~> php5 -v PHP 5.0.4 (cgi) (built: Nov 17 2005 20:31:32) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies tolan@twrk:~> php -v PHP 4.4.0 (cli) (built: Nov 17 2005 20:26:48) Copyright (c) 1997-2004 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
Petr: Does this have a special reason, maby because of the interface? And can this be changed easily by the user? Compiling and using PHP on Apache with CGI is really no good idea... it is awfully slow and uses much ressources...
I had this problem too. I fixed it: open the spec file. find near the line.. 157x "Install cli" replace for: pushd build-cli # make sure it's the cli version make install-cli INSTALL_ROOT=$RPM_BUILD_ROOT PHP_PEAR_PHP_BIN=%{_bindir}/%{name} # all the shared modules make install-modules INSTALL_ROOT=$RPM_BUILD_ROOT PHP_PEAR_PHP_BIN=%{_bindir}/%{name} # pear make install-pear INSTALL_ROOT=$RPM_BUILD_ROOT PHP_PEAR_PHP_BIN=%{_bindir}/%{name} #devel tools ( php-config , phpize and headers) make install-programs INSTALL_ROOT=$RPM_BUILD_ROOT PHP_PEAR_PHP_BIN=%{_bindir}/%{name} make install-headers INSTALL_ROOT=$RPM_BUILD_ROOT PHP_PEAR_PHP_BIN=%{_bindir}/%{name} popd
BTW.. I only tested that fix on PHP 5.1.2-dev ( CVS) php5 -v PHP 5.1.2-dev (cli) (built: Dec 12 2005 17:35:29) Copyright (c) 1997-2005 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2005 Zend Technologies.
forget that change. the problem it's the spec file is missing --disable-cgi(or maybe --disable-all) at **the end** of "Build cli" configure line. since both cli and cgi are enabled by default and both binaries are built with the same name. see: http://cl.php.net/manual/en/features.commandline.php
For stable I fixed it and submited. Andreas, can I fix it for SL10.0 and have I prepare YOU?
*** Bug 119027 has been marked as a duplicate of this bug. ***
Ok for 10.0, swampid is: Maintenance-Tracker-3298
Petr, what is the status here?
I have to fix some security bugs in php5 for all distros and I probably fix this bug together with the security update.
Petr :Nice to know you will fix this on 10.0 too ..the actual binary it's quite annoying,and resource hungry.:-P
fixed for 9.3 and 10.0 with security bug #143696