Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109276 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 83867 invoked from network); 24 Mar 2020 16:47:02 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Mar 2020 16:47:02 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 21B0A1804F8 for ; Tue, 24 Mar 2020 08:11:29 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: ** X-Spam-Status: No, score=2.6 required=5.0 tests=BAYES_00, CK_HELO_DYNAMIC_SPLIT_IP,HELO_DYNAMIC_SPLIT_IP,RDNS_DYNAMIC, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS16276 149.56.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from 28.ip-149-56-142.net (28.ip-149-56-142.net [149.56.142.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 24 Mar 2020 08:11:28 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: thruska@cubiclesoft.com) with ESMTPSA id 38FEA3E87A To: =?UTF-8?Q?Johannes_Schl=c3=bcter?= , Mike Schinkel , Remi Collet Cc: internals@lists.php.net References: <2d2757f9-7303-3f57-6318-68ebdc4a8097@php.net> <9711E280-743A-4EBE-9E32-9D21A2E5FFC7@newclarity.net> <0f1d5ea5afaf9e102a20b1bafeaddad423ab1812.camel@schlueters.de> Message-ID: Date: Tue, 24 Mar 2020 08:11:25 -0700 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 In-Reply-To: <0f1d5ea5afaf9e102a20b1bafeaddad423ab1812.camel@schlueters.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Are PECL modules preferable? From: thruska@cubiclesoft.com (Thomas Hruska) On 3/23/2020 3:53 PM, Johannes Schlüter wrote: > For Windows pecl produces builds where we can, while users have to > install by hand. Yeah, I've noticed this and thought about building a tool to help automate installation. However, it would be much easier to use PECL extensions on Windows if PHP on Windows actually had a simple way to add all the DLLs in a PECL extension to *just* the 'ext' directory and not have to copy multiple DLLs all over the place. For example, imagick has a ton of imported DLLs that are referenced by the main extension DLL, which fails to load for a lot of people. Then they have to go searching Google to figure out how to fix it for each separate SAPI. I'm thinking the problem is something that can be remedied with SetDllDirectory(): https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setdlldirectorya Or AddDllDirectory(): https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-adddlldirectory Depending on if WinXP support is still a thing and/or having multiple directories is even possible. Calling LoadLibraryEx() looks like it would be a pain to implement given that the only references in the entire code to "LoadLibrary" is pushed all the way back into m4/configure? As PHP parses the 'extension_dir' INI option, it could call the relevant function above to allow for loading additional DLLs from the same directory when loading extensions. Doing that would fix so many Windows loader related issues that people have with getting the precompiled PECL extensions to work on Windows (especially with mixed SAPI environments). -- Thomas Hruska CubicleSoft President I've got great, time saving software that you will find useful. http://cubiclesoft.com/ And once you find my software useful: http://cubiclesoft.com/donate/