Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50184 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13202 invoked from network); 13 Nov 2010 20:03:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Nov 2010 20:03:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=jerome@loyet.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jerome@loyet.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain loyet.net from 209.85.214.170 cause and error) X-PHP-List-Original-Sender: jerome@loyet.net X-Host-Fingerprint: 209.85.214.170 mail-iw0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:58299] helo=mail-iw0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/02-12820-C0FEEDC4 for ; Sat, 13 Nov 2010 15:03:24 -0500 Received: by iwn6 with SMTP id 6so5399299iwn.29 for ; Sat, 13 Nov 2010 12:03:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.175.3 with SMTP id ay3mr1933679icb.525.1289678601083; Sat, 13 Nov 2010 12:03:21 -0800 (PST) Received: by 10.42.123.130 with HTTP; Sat, 13 Nov 2010 12:03:21 -0800 (PST) In-Reply-To: References: <4CDC469B.7050801@iki.fi> <4CDC8CE7.6050101@iki.fi> <4CDCA56F.1000807@iki.fi> <4CDDC64D.4040405@iki.fi> Date: Sat, 13 Nov 2010 21:03:21 +0100 Message-ID: To: Stanley Sufficool Cc: Jani Taskinen , 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?=) Le 13 novembre 2010 20:50, Stanley Sufficool a =E9cr= it : > 2010/11/13 J=E9r=F4me Loyet : >> Le 12 novembre 2010 23:57, Jani Taskinen a =E9cri= t : >>> I updated the patch: >>> >>> =A0http://pecl.php.net/~jani/patches/multi-sapi.patch >>> >>> Now it will fail if no sapi/binary is selected. And "make install" will= now >>> also install them all. :) >> >> it seems to work well. > > I think Gentoo already has a multiple SAPI build in their PHP patch set. so as FreeBSD > >> >>> >>> The question remains: into what branches can I commit it? >>> Some might think it's not a bug fix.. ;) >> >> I don't really know. As it may changes the way package managers manage >> the way to compile multiple sapi at once, it could work for them. It >> would maybe be more logic to commit it in trunk. >> >> In all the cases, I think a patch which changes the unix buildchain >> have to be tested widely before commiting. what you think ? >> >> ++ Jerome >>> >>> --Jani >>> >>> >>> 12.11.2010 10:23, J=E9r=F4me Loyet kirjoitti: >>>> >>>> 2010/11/12 Jani Taskinen: >>>>> >>>>> And here's the patch: >>>>> >>>>> =A0http://pecl.php.net/~jani/patches/multi-sapi.patch >>>>> >>>>> Note: It's not quite finished, the 'make install' might not work.. ;) >>>> >>>> After a very quick try, there is a missing case: if not SAPI and no >>>> binaries have been selected, we should trigger an error message. The >>>> configture is terminating normaly et make does nothing (normal). >>>> >>>> ++ Jerome >>>> >>>>> >>>>> --Jani >>>>> >>>>> >>>>> 12.11.2010 2:40, Jani Taskinen kirjoitti: >>>>>> >>>>>> I'm working on an improvement on how all binaries are build thus >>>>>> enabling building all such in one go if one wants to. I already adde= d a >>>>>> check for multiple sapi _modules_ being build, it will error out. >>>>>> >>>>>> Stay tuned, I'll post the patch once I've tested it a bit. >>>>>> >>>>>> --Jani >>>>>> >>>>>> >>>>>> 12.11.2010 0:03, J=E9r=F4me Loyet kirjoitti: >>>>>>> >>>>>>> 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 configu= re >>>>>>>>>> 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 sy= stem >>>>>>>>> causing this, so yeah I suppose it should be fixed. >>>>>>>>> >>>>>>>> >>>>>>>> Sascha explained this briefly here: >>>>>>>> >>>>>>>> http://www.mail-archive.com/php-cvs@lists.php.net/msg00413.html >>>>>>> >>>>>>> I understand it's hard to compile mutiple SAPI (dependancies, linka= ge, >>>>>>> ...). 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 comp= ile >>>>>>> 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 us= es >>>>>>> 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 sa= pi >>>>>>> must be like any of the others >>>>>>> >>>>>>> - change the cgi sapi to be disable by default. cgi sapi will be li= ke >>>>>>> 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 fil= es >>>>>>> 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 bee= n >>>>>>> called only once (all SAPI (except CLI) calls this macro). At secon= d >>>>>>> call, an error message telling that only one SAPI can be compiled i= s >>>>>>> shown. >>>>>>> >>>>>>> I don't have a huge php core background but it seems (for me at lea= st) >>>>>>> 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 >>>>> >>>>> >>> >>> >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> >