2010/11/11 Jani Taskinen <jani.taski...@iki.fi>: > 11.11.2010 18:46, Kalle Sommer Nielsen kirjoitti: >> >> Hi Jérôme >> >> 2010/11/11 Jérôme Loyet<jer...@loyet.net>: >>> >>> If this is a normal behaviour, we should add an error at configure >>> telling that only one SAPI is supported at once. >>> It not, we should correct it. >>> >>> Did I miss something ? >> >> On Windows we have no problems in compiling multiple SAPI's using one >> ./configure, so I believe it is indeed a bug on the Unix build system >> causing this, so yeah I suppose it should be fixed. >> > > Sascha explained this briefly here: > > http://www.mail-archive.com/php-...@lists.php.net/msg00413.html
I understand it's hard to compile mutiple SAPI (dependancies, linkage, ...). In this case, this should be clear at configure and an error message should be shown. It's not reasonable not to be able to compile CGI and apache2 sapi without any informations (like http://bugs.php.net/53271). I've made a quick patch (http://pastebin.com/jUGMtSjv) which: - move the sapi/cgi/config9.m4 to config.m4. The reason cgi sapi uses a config9.m4 file is to be called at configure as the last SAPI. - remove the "No SAPI selected" check in sapi/cgi/config.m4. To me it's not its job. It has to be done by configure. To me, the cgi sapi must be like any of the others - change the cgi sapi to be disable by default. cgi sapi will be like any other sapi (except cli), disable by default. Basically, PHP is a programming scripting language. The CLI has to be enable by default and other sapi have to be enabled by the user. - add a "No SAPI selected" check in configure.in, after "esyscmd(./build/config-stubs sapi)" (after all sapi config*.m4 files have been executed). Use CLI as default SAPI if it's not been disabled. If all SAPI and CLI have been disabled, issue the error message. - A a check in PHP_SELECT_SAPI (in acinclude.m4) to ensure it's been called only once (all SAPI (except CLI) calls this macro). At second call, an error message telling that only one SAPI can be compiled is shown. I don't have a huge php core background but it seems (for me at least) the right way for users. hope it helps. > > Something called ZTS also comes to my mind.. It's not the first time ZTS comes in the discution about multiple SAPI. I've made some tests and looked into the code of the build chain, but I can't see how it's related. Maybe someone can enlight me ? thx ++ jerome -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php