Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74520 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25839 invoked from network); 27 May 2014 13:29:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 May 2014 13:29:32 -0000 Authentication-Results: pb1.pair.com header.from=mike.php.net@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mike.php.net@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.176 as permitted sender) X-PHP-List-Original-Sender: mike.php.net@gmail.com X-Host-Fingerprint: 74.125.82.176 mail-we0-f176.google.com Received: from [74.125.82.176] ([74.125.82.176:42392] helo=mail-we0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8A/11-18053-B3394835 for ; Tue, 27 May 2014 09:29:32 -0400 Received: by mail-we0-f176.google.com with SMTP id q59so9643685wes.35 for ; Tue, 27 May 2014 06:29:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=TxBoFB3f6AREC9gVUG/qOjMbfs0xBBAzEuKKgg94GD0=; b=0DSEa63OeEOfJ4+/ywx7ZxlTHyry70+22yVj2FA1NGdneYtwvv9gyAn8vROLYg8vcs wCEnQoV9ZXMBhUjekx2lsP4LWUOPAxto3cYtobaEAly5ntOWONXgOuaHAhIw1FWoJJHI AC6NQIzOdBp13icI1gwCWAD8eTLHQ8OAv+CDA6BZ4kPzeBMrHP7qrJjlODRNIwlUTJmO EBv0ng2aMZVUb8hZDHUc6kocp3IleIqliuK+t9vOKp3Ro22MYVcpQETg/4hfbKPzhQrj FUMGhCihfWa2krrxa9xa0/Rb/2GlvSdCHs5jeRzNSyhjUHrh+JW8k/nLA/QkSIe4tNrp mhuA== X-Received: by 10.194.189.116 with SMTP id gh20mr40953604wjc.41.1401197366857; Tue, 27 May 2014 06:29:26 -0700 (PDT) Received: from lepisma.bemi (178-18-170-101.customer.bnet.at. [178.18.170.101]) by mx.google.com with ESMTPSA id nb8sm8379570wic.18.2014.05.27.06.29.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 May 2014 06:29:25 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) In-Reply-To: <1401193927.2998.50.camel@guybrush> Date: Tue, 27 May 2014 15:29:22 +0200 Cc: Michael Wallner , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <1401193927.2998.50.camel@guybrush> To: =?windows-1252?Q?Johannes_Schl=FCter?= X-Mailer: Apple Mail (2.1874) Subject: Re: [PHP-DEV] Linking and autoloading of dependent extensions From: mike.php.net@gmail.com (Michael Wallner) On 27 05 2014, at 14:32, Johannes Schl=FCter = wrote: > On Tue, 2014-05-27 at 14:13 +0200, Michael Wallner wrote: >> I've prepared a tiny POC which enables linking and autoloading of >> dependent extensions: >> https://github.com/m6w6/php-src/compare/module_deps >>=20 >> Anybody else other than me interested in this feature? >=20 > This is a problem hurting me for a while and I'm happy you're looking > into it! I'm not sure about the solution here, though. This solution > assumes >=20 > * the extension is inside extension_dir and > * a specific naming scheme on the extension's shared library = file. >=20 > Both assumptions might be wrong and might lead to loading the wrong = file > when different ones are around. This will also lead to a misleading > error message ("PHP Warning: Module 'foo' already loaded in Unknown = on > line 0") where the users just tries to load it once in wrong order. Thanks Johannes, as always you=92ve got a bigger picture than I have! The warning should be easy to mitigate except for multiple extension INI = entries; not sure if this is that important, though. The second problem is a bit harder, except for source distribution = installations where EXTENSION_DIR should be fine and PECL installs where = I could use INI=92s extension_dir. For relocated extension_dirs like Linux dist packages, this might indeed = be a problem. Thank you, Mike