php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79557 extension_dir = "./ext" now use current directory for base
Submitted: 2020-05-02 15:38 UTC Modified: 2020-05-04 12:45 UTC
From: laurinkeithdavis at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Dynamic loading
PHP Version: 7.4.5 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: laurinkeithdavis at gmail dot com
New email:
PHP Version: OS:

 

 [2020-05-02 15:38 UTC] laurinkeithdavis at gmail dot com
Description:
------------
7.4 on Windows, the issue of the working directory being used instead of the base directory appears to be happening again.

Same as: https://bugs.php.net/bug.php?id=74866

Test script:
---------------
php.ini for both has this setting.

extension_dir = "./ext/"

7.4:

c:\jenkins-php-tools>C:\PHP\php.exe -cc:/PHP/devrc/php.ini


7.3.16:

c:\jenkins-php-tools>C:\PHP\php.exe -cc:/PHP/devrc/php.ini

Expected result:
----------------
(loads, no errors)

Actual result:
--------------
7.4:

Warning: PHP Startup: Failed to load ./ext/php_curl.dll, The system cannot find the file specified.
 in Unknown on line 0
Warning: PHP Startup: Failed to load ./ext/php_fileinfo.dll, The system cannot find the file specified.
 in Unknown on line 0
Warning: PHP Startup: Failed to load ./ext/php_gd2.dll, The system cannot find the file specified.
 in Unknown on line 0

7.3:

No errors

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-05-04 09:01 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2020-05-04 09:01 UTC] cmb@php.net
I can confirm the reported behavior.  Using "ext" instead of
"./ext" works, though.
 [2020-05-04 11:29 UTC] laurinkeithdavis at gmail dot com
Interesting. I looked through the source and it appears that the patch added for the previous bug still exists, but I don't know C well enough to understand how "ext" would be treated differently from "./ext".
 [2020-05-04 12:45 UTC] cmb@php.net
-Status: Assigned +Status: Analyzed
 [2020-05-04 12:45 UTC] cmb@php.net
As of PHP 7.4.0, PHP checks for the linker version of extension
DLLs, using ImageLoad().  For some reason, that function fails to
load images if the path starts with ./ or .\.
 [2020-05-04 12:58 UTC] cmb@php.net
The following pull request has been associated:

Patch Name: Fix #79557: extension_dir = ./ext now use current directory for base
On GitHub:  https://github.com/php/php-src/pull/5523
Patch:      https://github.com/php/php-src/pull/5523.patch
 [2020-05-15 07:24 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=8c6d006b55bf5ba230dda672344dbd0e2a7d4be3
Log: Fix #79557: extension_dir = ./ext now use current directory for base
 [2020-05-15 07:24 UTC] cmb@php.net
-Status: Analyzed +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 03:01:28 2024 UTC