Re: CGI and CLI [packaging issues]

From: Date: Mon, 06 Jan 2003 11:14:52 +0000
Subject: Re: CGI and CLI [packaging issues]
References: 1 2 3 4 5 6  Groups: php.dev 
Request: Send a blank email to php-dev+get-93174@lists.php.net to get a copy of this message
At 06:55 06.01.2003, Jean-Michel Dault wrote:
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".
This will help a lot when coming from you.
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
From my point of view this is the best solution :-)) regards marcus aka helly -- ---------------------------------------------------------------------- Marcus Börger - Looking for all sorts of freelance work - just ask... Did i help you? Consider a gift: http://www.amazon.de/exec/obidos/wishlist/ho722v0rg1u0 ----------------------------------------------------------------------

« previous php.dev (#93174) next »