Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71506 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13857 invoked from network); 24 Jan 2014 14:30:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jan 2014 14:30:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.44 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.212.44 mail-vb0-f44.google.com Received: from [209.85.212.44] ([209.85.212.44:43228] helo=mail-vb0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/41-39789-C0972E25 for ; Fri, 24 Jan 2014 09:30:37 -0500 Received: by mail-vb0-f44.google.com with SMTP id f12so1887868vbg.17 for ; Fri, 24 Jan 2014 06:30:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=Jcm2JRyRAIW3b8l0ePKUZJGcFDUBOs5l/3ccz/St/fE=; b=zQo2tpUr2LfrLEA/Ajh87WGJva8wZz6f25bvTENfEwkzgbsxJoUwBriJ1LsG7PRz6o CmiTM0MxF/iyhPs2chfc4xcr9ClawBr9MpIxJs10Icv+IUfAxKP94/uV/UtkbiwAwji5 Vsa2fwGoQABWYwmK+ilZIiSnwB0iSqZdbygNxqZ5DsoJN2rBHa/KL3+ntFxJIgJCrJHf CFqk6zTQmFm1L1J0n1+q4C7dsOf9l2y281QAwBAxbCDhSEpWrfjO/NSTGBk9cO7Ij2to ubN5stFzSIRcGavnR/Z16zFwsDpvz/w/2lVGEWirWNQj0VbZjVr2vJ3buckv7vaRGxqD MGQA== X-Received: by 10.58.181.165 with SMTP id dx5mr7592713vec.19.1390573833520; Fri, 24 Jan 2014 06:30:33 -0800 (PST) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.220.158.206 with HTTP; Fri, 24 Jan 2014 06:29:53 -0800 (PST) In-Reply-To: <1390572927.2941.37.camel@guybrush> References: <1390568541.2941.27.camel@guybrush> <1390572927.2941.37.camel@guybrush> Date: Fri, 24 Jan 2014 15:29:53 +0100 X-Google-Sender-Auth: e4LW84Hbxy18QCnxnkA1ZNgpN3c Message-ID: To: =?ISO-8859-1?Q?Johannes_Schl=FCter?= Cc: Sara Golemon , PHP internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Module API Introspection From: jpauli@php.net (Julien Pauli) On Fri, Jan 24, 2014 at 3:15 PM, Johannes Schl=FCter wrote: > On Fri, 2014-01-24 at 15:01 +0100, Julien Pauli wrote: >> > * I think (didn't check) there will be issues due to tsrm >> symols >> > when an extension provides INI options and TSRM/non-TSRM >> doesn't >> > match >> >> I don't get it. We access very few fields of zend_module_entry, and >> they are all placed before the _zend_ini_entry one. So if there is a >> problem of alignment mismatch, we won't be affected AFAIK. >> > INI settings are in a global variable, referring to specific update > handlers. I remember cases where the error while loading extensions was > about missing OnUpdateBool. I can imagine other similar errors. > >> > * Afaik Windows' LoadLibrary doesn't do lazy loading but will >> > confront the user with a dialog box when symbols can't be >> found >> > * ... I'm sure there are more >> >> Same : the same happens on WIndows when you try to load an extension. >> So , we already manage this behavior and cant do anything about it. >> > The point is: What is the benefit of such a feature if it often can't be > used? Maybe we can think more and find a better way to approach this? I'm all open to new ideas :-) > I don't have a better idea than something like a shell script doing > `strings xdebug.so | grep API` -- which obviously is no good idea > either, but maybe somebody is smarter than me. That's what we ended telling to attendees : we have no way in PHP actually to check the API of an extension, except by trying to load it. However, GNU tools playing with ELF format are a global Unix solution working, but not coming from PHP obviously. The only safe thing we could do, is wrapping libelf and play with it. Somehow dirty and adds a new dependency :-p Julien