Le sam 04/01/2003 ā 18:13, Marcus Börger a écrit : > What might happen is that CLI becomes widely accepted and scripts > calling php from shebang lines. Id so your above solution is a bad idea > and i hope CLI will be...
I'm CC'ing the maintainers of PHP for most distributions of Linux, so we can all be in sync. For those that don't know the issue, I'll resume it by saying that with PHP 4.3, there is a new CLI (command-line interface) that complements the CGI interface. The problem is, both files are named "php". Here is the solution that I have been experimenting over the past few days, and that will be implemented in Mandrake Cooker (and soon 9.1): - There will be two RPMS: php-cli and php-cgi. - Both packages will provide php - Using the "update-alternatives", each package will contain /usr/bin/php as a symlink to the respective binary. This lets us give a priority to which binary is called for a given symlink. php-cli will be given priority 20 (higher), php-cgi will be given priority 10 (lower) - If only one package is installed, /usr/bin/php will link to the right executable. - By default, php-cgi will be installed, in order to maintain backwards compatibility. - Users will be able to install the CLI using rpm -i php-cli - If both packages are installed, php-cli will be called since it's higher priority. - All packages that specifically require the command-line interface (there is none for the moment, but there will be in the future), will explicitely require php-cli. This setup means that we don't break the configuration of people that already have the php CGI interface, while, with one simple command, the new PHP command-line enthusiasts will be able to have their cake. This goes with the PHP source approach: By default, "configure/make/make install" compiles the CGI interface, and then you have to "make install-cli" to get the CLI. We just replace the "make install-cli" by "urpmi/apt-get php-cli". Comments/Questions/Suggestions welcome. Jean-Michel Dault PHP/Apache packager Mandrake Linux -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php