Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7350 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75030 invoked by uid 1010); 27 Jan 2004 14:51:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 74912 invoked from network); 27 Jan 2004 14:51:10 -0000 Received: from unknown (HELO smtp1.pp.htv.fi) (212.90.64.119) by pb1.pair.com with SMTP; 27 Jan 2004 14:51:10 -0000 Received: from localhost.localdomain (cs181008.pp.htv.fi [213.243.181.8]) by smtp1.pp.htv.fi (Postfix) with ESMTP id A53657FC34; Tue, 27 Jan 2004 16:51:09 +0200 (EET) Received: from localhost (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.10/8.12.10) with ESMTP id i0REp7pn009276; Tue, 27 Jan 2004 16:51:08 +0200 Date: Tue, 27 Jan 2004 16:51:07 +0200 (EET) Reply-To: Jani Taskinen To: "Brian J. France" Cc: internals@lists.php.net In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] Compiling 2 SAPIs From: sniper@iki.fi (Jani Taskinen) On Mon, 26 Jan 2004, Brian J. France wrote: >> I have a project where I need to have both Apache SAPI (shared) and >> embed SAPI (shared) compiled/active at the same time. Is that possible >> to do at all? Any risk of symbol clashes or other similar problems? > >Andrei posted this a while ago, but nobody replied and we have learned >this is it not possible. > >With the current state of the code and configuration system what would >it take to do something like this: > >Core PHP code is built into libphpX.so (libphp4.so) > >All SAPI's require libphpX.so: > >libphpX_apache.so <- apache sapi >libphpX_embeded.so <- apache sapi > >and the command line sapi would have a depenency on libphpX.so. Here's what I came up with: http://www.php.net/~jani/patches/multi_sapi_build.patch With the patch applied, I'm now able to build at least apache, cli, cgi and embed SAPIs on one run. # ./configure --disable-all --with-apxs --enable-embed (CLI and CGI are build by default..) I build them using static 'core' lib as I dislike the idea of having to install and maintain several libs. :) But if someone insists, it's possible to build one shared lib too..I actually tested with that first. :) --Jani