Hello all,

Sorry to re-activate this topic, but I stumbled into an issue when
packaging PHP 4.3 as an RPM for Mandrake. 

What happens when a user wants to install *both* php-cli and php-cgi? 
You cannot have two files with the same name, either in the same RPM, or
in two different RPMS... This is not RPM specific, since it will create
the same problem with apt, pkgtool, or others.

For Windows, the php.exe and cli/php.exe is good, but on Unix, it would
be bad to have, say, /usr/bin/php and /usr/bin/cli/php!

Here is yet another compromise (for Unix)
1) - name the cli version php-cli
2) - name the cgi version php-cgi
3) - use a wrapper script, symbolic link or another tool (such as
update-alternatives for Linux), to decide which one to call.
4) - tell everyone to change their scripts for the future, so it points
to the right php version.

Step #4 is not that bad, since we always have to change the 1st line of
the scripts anyways... You never know where php is installed, since
DESTDIR is a variable. 

And with the wrapper script, we keep BC, at the expense of a slowdown of
performance.

What do you think?

PS: please answer to me personnaly, as I don't check this mailing list
often.

Regards,

Jean-Michel Dault
Apache/PHP maintainer, Mandrake Linux


Le jeu 19/12/2002 ā 10:33, Edin Kadribasic a écrit :
> After having consulted with Andrei, Derick and others on irc here is
> a proposal for a compromise:
> 
> On Unix:
> 
> 1. Both cgi and cli are built as 'php' in their respective sapi
> directories (pretty much as it is today except that cgi gets renamed
> back from php-cgi to just php).
> 2. Make install will *not* install cli if cgi build was selected
> (only cgi gets installed).
> 3. A new install target 'install-cli' is introduced so that make
> install-cli will overwrite whatever is in $(PREFIX)/bin/php.
> 
> On Windows:
> 
> 1. php.exe in the root of distribution is php cgi sapi.
> 2. New cli directory is included with php.exe (cli) in it.
> 
> If this is an acceptable compromise I volunteer to do the changes
> required.
> 
> Edin
> 
> 
> -- 
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to