Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56289 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47412 invoked from network); 11 Nov 2011 20:45:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Nov 2011 20:45:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.161.170 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.161.170 mail-gx0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:35330] helo=mail-gx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A3/17-09898-D698DBE4 for ; Fri, 11 Nov 2011 15:45:33 -0500 Received: by ggnk4 with SMTP id k4so5240307ggn.29 for ; Fri, 11 Nov 2011 12:45:30 -0800 (PST) Received: by 10.68.37.42 with SMTP id v10mr27354622pbj.22.1321044330045; Fri, 11 Nov 2011 12:45:30 -0800 (PST) Received: from [192.168.200.5] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPS id s4sm32702174pbq.8.2011.11.11.12.45.28 (version=SSLv3 cipher=OTHER); Fri, 11 Nov 2011 12:45:29 -0800 (PST) Message-ID: <4EBD8967.8040606@lerdorf.com> Date: Fri, 11 Nov 2011 12:45:27 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: "Edward Z. Yang" CC: internals References: <1320740449-sup-5688@ezyang> <4EB8EAF1.3040104@lerdorf.com> <1320981061-sup-2803@ezyang> <4EBD79A5.2020604@lerdorf.com> <1321040435-sup-2225@ezyang> In-Reply-To: <1321040435-sup-2225@ezyang> X-Enigmail-Version: 1.4a1pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Load extensions for .user.ini files From: rasmus@lerdorf.com (Rasmus Lerdorf) Well, it is simple enough that we don't really need a patch. However, generally if you want to submit a patch it needs to be against a current svn branch and not an old release. You want to minimize the work people will need to do to look at your suggested change. The other issue with your patch is that you are enabling this for the fpm sapi. I thought we agreed that this should only be in the sapis that supported dl() and those are cgi, cli and embed. And .user.ini doesn't apply to embed, so it would just be cli and cgi because these are the non-persistent cases where there is no danger of screwing up the next request with a bad extension in a .user.ini file. -Rasmus On 11/11/2011 11:42 AM, Edward Z. Yang wrote: > http://svn.php.net/repository/php/php-src/branches/PHP_5_3 > r318957 > > We also applied it to 5.3.8 release, although we had to fix up the patch > for that. I can port it to 5.4. > > Edward > > Excerpts from Rasmus Lerdorf's message of Fri Nov 11 14:38:13 -0500 2011: >> Which branch in this patch against? It doesn't apply to 5_3/5_4/trunk >> >> It is short and simple so I could do it manually, of course, but I'd >> like to know what you have been testing it against. >> >> On 11/10/2011 07:14 PM, Edward Z. Yang wrote: >>> Here is the proposed patch (sans tests; we did our own manual testing >>> on 32-bit and 64-bit, and had to fix an unrelated bug; will provide >>> tests when you say so): >>> >>> http://web.mit.edu/~ezyang/Public/php-user-ini-extension.patch >>> >>> The change to zlist_clean is necessary because otherwise extension_lists can't >>> be reused for the second round of extension appliations (since the head and >>> tail pointers have garbage in them). You should probably take that fix regardless >>> of what you think of the feature change. >>> >>> Edward >>> >>> Excerpts from Rasmus Lerdorf's message of Tue Nov 08 03:40:17 -0500 2011: >>>> On 11/08/2011 12:23 AM, Edward Z. Yang wrote: >>>>> Hello all, >>>>> >>>>> My team is interested in permitting .user.ini files to load >>>>> extensions. We believe this to be a simple fix: add >>>>> an invocation of php_ini_register_extensions to the end >>>>> of sapi/cgi/cgi-main.c. >>>>> >>>>> I don't believe this steps on any invariants, since extensions >>>>> can usually be loaded arbitrarily late. >>>>> >>>>> Let me know what the list thinks. I can submit a patch and tests >>>>> if y'all decide it's a good idea. >>>> >>>> You are aware that these extensions can't be unloaded, right? So one >>>> user loading an extension will potentially be stepping on another user >>>> and breaking their code. >>>> >>>> -Rasmus