Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50152 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49230 invoked from network); 11 Nov 2010 22:03:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Nov 2010 22:03:36 -0000 Authentication-Results: pb1.pair.com header.from=jerome@loyet.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=jerome@loyet.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain loyet.net from 74.125.83.42 cause and error) X-PHP-List-Original-Sender: jerome@loyet.net X-Host-Fingerprint: 74.125.83.42 mail-gw0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:56247] helo=mail-gw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/B0-39621-5386CDC4 for ; Thu, 11 Nov 2010 17:03:35 -0500 Received: by gwb10 with SMTP id 10so1161560gwb.29 for ; Thu, 11 Nov 2010 14:03:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.150.186.18 with SMTP id j18mr2687492ybf.24.1289513008961; Thu, 11 Nov 2010 14:03:28 -0800 (PST) Received: by 10.151.142.18 with HTTP; Thu, 11 Nov 2010 14:03:28 -0800 (PST) In-Reply-To: <4CDC469B.7050801@iki.fi> References: <4CDC469B.7050801@iki.fi> Date: Thu, 11 Nov 2010 23:03:28 +0100 Message-ID: To: Jani Taskinen Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [PHP] multiple sapi (multiple bug reports) From: jerome@loyet.net (=?ISO-8859-1?B?Suly9G1lIExveWV0?=) 2010/11/11 Jani Taskinen : > 11.11.2010 18:46, Kalle Sommer Nielsen kirjoitti: >> >> Hi J=E9r=F4me >> >> 2010/11/11 J=E9r=F4me Loyet: >>> >>> 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: > > =A0 =A0http://www.mail-archive.com/php-cvs@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