Bug #74866 [Opn->Ver]: extension_dir = "./ext" now use current directory for base
| From: | requinix@php.net | Date: | Thu, 06 Jul 2017 15:10:40 +0000 |
| Subject: | Bug #74866 [Opn->Ver]: extension_dir = "./ext" now use current directory for base | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-209858@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74866&edit=1
ID: 74866
Updated by: requinix@php.net
Reported by: sailormax at inbox dot lv
Summary: extension_dir = "./ext" now use current directory
for base
-Status: Open
+Status: Verified
Type: Bug
Package: Dynamic loading
Operating System: Windows 10
PHP Version: 7.2.0alpha3
-Assigned To:
+Assigned To: francois
Block user comment: N
Private report: N
New Comment:
Caused by the extension loading changes added in alpha3.
https://wiki.php.net/rfc/load-ext-by-name
https://github.com/php/php-src/pull/1741
alpha2 constructed a DLL filename and went straight to DL_LOAD/LoadLibrary, which looks relative to
the process.
alpha3 also constructs a filename but first tests the path with VCWD_ACCESS/tsrm_win32_access, which
itself tests access to the parent directory.
Previous Comments:
------------------------------------------------------------------------
[2017-07-06 12:27:10] sailormax at inbox dot lv
Description:
------------
Early builds works with "./" in
extension_dir setting as with directory of
php.exe
Start from 7.2alpha3 "./" in extension_dir setting PHP start to understand as
current directory.
In result if start php.exe from any other directory, it try to load extensions from current
directory.
Test script:
---------------
php.ini:
extension_dir = ".\ext"
extension=php_bz2.dll
exec php from parent directory:
> php\php.exe --version
Expected result:
----------------
PHP 7.2.0alpha3 (cli) ...
Actual result:
--------------
Warning: Cannot access dynamic library 'php_bz2.dll' (tried : ext\php_bz2.dll,
ext\php_php_bz2.dll.dll) in Unknown on line 0
PHP 7.2.0alpha3 (cli) ...
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74866&edit=1