Re: CLI Sapi automatic build
| From: | Hartmut Holzgraefe | Date: | Mon, 14 Jan 2002 12:04:36 +0000 |
| Subject: | Re: CLI Sapi automatic build | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-77048@lists.php.net to get a copy of this message | ||
Edin Kadribasic wrote:
ok, blame me, so it's just a naming issuetake aWhat is wrong with adding a third parameter to PHP_EXTENSION? If youlibrarieslook at the patch, you will see that I need to create a list ofmacrosthat is only built with cli. I don't know how to do that with the twoIf you take a look at the patch, you will see that this is exactly what it does -- it binds the extension to a class of sapi's. In this case cgi and cli.you added.you tie ext/pcntl to a certain sapi although it should be available for a certain class of sapis, the standalone ones ext/readline and ext/ncurses are similar cases, they are only usefull in interactive sapis
"throw out of the class of interactive sapis" this should read, i never intended to sugguest to nuke cgiuntil now both classes had only one member, the cgi sapi right now they have two members, cgi and cli, although cgi should be thrown out as soon as cli is done and ready,Cgi is very usefull thing to have and it shouldn't be removed. It's just that is not well suited for command line scripts.
but what do we loose if we prepare for additional interactive/standalone sapis by using the checks i added so that we have to do changes in only *one* place instead of changing the calls to PHP_EXTENSION all over the place (not to speak of extension not even in the php4 CVS)?
Sorry, I forgot to mention that the third parameter is optional so it does not affect any extensions that don't use it. The checks you added prevent
building say apache module and cli at the same time with some extensions that are available in interactive mode only. With my proposed extension to PHP_EXTENSION the build becomes "smart" in that it links those extensions only with the cli, and not with the other api selected with the build.IMHO this is to smart after all as it might be smarter than the user :( i'm alread expecting bug reports regarding "my apache module doesn't have extension xyz although i configured it ..." i'd prefer to do the checks my way, if one wants a customized CLI then he/she should explicitly configure for CLI IMHO i already build different configured executables for CGI and for command line use with the current CGI sapi PS: you were right, i totally missed the dual-build issues
in my first replies-- Hartmut Holzgraefe hartmut@six.de http://www.six.de +49-711-99091-77