Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36519 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92505 invoked from network); 25 Mar 2008 20:13:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Mar 2008 20:13:54 -0000 Authentication-Results: pb1.pair.com header.from=thetaphi@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=thetaphi@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 80.190.230.99 as permitted sender) X-PHP-List-Original-Sender: thetaphi@php.net X-Host-Fingerprint: 80.190.230.99 www.troja.net Linux 2.5 (sometimes 2.4) (4) Received: from [80.190.230.99] ([80.190.230.99:46711] helo=mail.troja.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5D/DC-28012-10D59E74 for ; Tue, 25 Mar 2008 15:13:54 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.troja.net (Postfix) with ESMTP id 3242043BE0; Tue, 25 Mar 2008 21:13:51 +0100 (CET) Received: from mail.troja.net ([127.0.0.1]) by localhost (cyca.troja.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28377-08; Tue, 25 Mar 2008 21:13:48 +0100 (CET) Received: from VEGA (port-83-236-62-51.dynamic.qsc.de [83.236.62.51]) (using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.troja.net (Postfix) with ESMTP id C2F03444CF; Tue, 25 Mar 2008 21:13:48 +0100 (CET) To: , "'Uwe Schindler'" Cc: "'George Wang'" , References: <47E80EB9.60900@litespeedtech.com> <698DE66518E7CA45812BD18E807866CE0165A861@us-ex1.zend.net> <20080325100552.00o51usgg04oogw0@mail.litespeedtech.com> <47E93244.4060001@litespeedtech.com> <000001c88eb0$80dbdce0$a401a8c0@VEGA> <47E958C0.9060407@sci.fi> Date: Tue, 25 Mar 2008 21:13:49 +0100 Message-ID: <000001c88eb4$bd4a74d0$a401a8c0@VEGA> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <47E958C0.9060407@sci.fi> Thread-Index: AciOskHXnAq4e/CjRSm7EeYH3Q7NmwAASW9Q X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Virus-Scanned: amavisd-new at troja.net Subject: RE: [PHP-DEV] Inclusion of PHP LiteSpeed SAPI in the standard PHP distribution? From: thetaphi@php.net ("Uwe Schindler") > > Is there a generic solution for SAPIs? > > The stuff is pretty generic, just check how it's done for > sapi/cgi/cgi_main.c in > function sapi_cgi_activate(). (IIRC :) > > I think I even put some comments in there.. Yes, looks good. Even the host-based config could be enabled by NSAPI. The code looks very generic and could be put directly into a generic SAPI function that runs after register_variables. You only need then _SERVER['DOCUMENT_ROOT'] (the length) and the script filename and HTTP_HOST/SERVER_NAME which is registered by every SAPI. One problem is in the per dir user config code: If one maps an alias for a directory containing the PHP scripts into his webserver config, the document root may not be a substring of the script file name, which would be a problem for the user config loading algorithm... You put the code into activate, but it may also be possible to do all this in the request startup I think...? I think we should discuss this in an extra thread. I would be happy to help with a generic solution (e.g. before script startup) and would help in implementing it! Uwe