Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66954 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71417 invoked from network); 4 Apr 2013 17:09:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Apr 2013 17:09:51 -0000 X-Host-Fingerprint: 86.14.252.140 cpc3-asfd3-2-0-cust139.1-2.cable.virginmedia.com Received: from [86.14.252.140] ([86.14.252.140:8287] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/77-35962-FD3BD515 for ; Thu, 04 Apr 2013 12:09:51 -0500 Message-ID: To: internals@lists.php.net Date: Thu, 04 Apr 2013 18:09:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 References: <515DA4DA.2060300@php.net> <1921fdc8-6aa8-4377-adca-38368386676c@email.android.com> In-Reply-To: <1921fdc8-6aa8-4377-adca-38368386676c@email.android.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Posted-By: 86.14.252.140 Subject: Re: [PHP-DEV] Re: Adding a way to retreive compile options at runtime From: krakjoe@php.net (Joe Watkins) On 04/04/2013 05:53 PM, Johannes Schlüter wrote: > > > Joe Watkins wrote: > >> Something that hasn't been mentioned, installation of software like >> wordpress or whatever, might be able to offer advice to the end user >> based on the configuration defaults, regardless of ini settings. > > Le me repeat what I said in this thread using other words: > > No, it can't. In a typical case (PHP from distribution with "all" extensions shared) this has *no* relevance regarding the running system. The extensions loaded might be built completely different from what's said there. > > Provide the information needed by constants or function calls from an extenson or whatever makes sense, don't advocate to do the wrong thing. > > johannes > Many extensions do not provide constants or functions to detect the way they are configured, this may or may not expose those options, which is better than not being able to expose those options by any reasonable means. More importantly, it does not only contain information about extensions, or which extensions are loaded and how ( I am aware of the problems of using this kind of information as authoritative, I still say something is better than nothing, see every 404 page in all modern browsers, why not provide suggestions, even if they are wrong ). Path information I figure could be useful while setting up software, so could many other configure time options, for example if more than one SAPI was built at configure time, you might advise the use of the most suitable SAPI for your software, you might generate an ini file and tell the user where to put it (scandir), you might have the abnormal path to php-config or other things distributed with php and installed in a non-standard path (/opt/php-nts in example output). There's a bunch of useful stuff in the configure command ... not just extensions loaded ...