Bug #74866 [Ver]: extension_dir = "./ext" now use current directory for base

From: Date: Thu, 06 Jul 2017 23:11:39 +0000
Subject: Bug #74866 [Ver]: extension_dir = "./ext" now use current directory for base
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209872@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:         ab@php.net
 Reported by:        sailormax at inbox dot lv
 Summary:            extension_dir = "./ext" now use current directory
                     for base
 Status:             Verified
 Type:               Bug
 Package:            Dynamic loading
 Operating System:   Windows 10
 PHP Version:        7.2.0alpha3
 Assigned To:        francois
 Block user comment: N
 Private report:     N

 New Comment:

@francois nice. Please let me know, if you need something to be tested.

Thanks.


Previous Comments:
------------------------------------------------------------------------
[2017-07-06 21:26:27] francois@php.net

@ab@php.net Sure, this is a BC break. It must be fixed before the release.

I'll take time tomorrow to work on it.

------------------------------------------------------------------------
[2017-07-06 19:08:09] ab@php.net

@spam2 at rhsoft dot net sure, but it should not happen as a side effect of another patch. For now
I'd say, the behavior should be fixed.

Thanks.

------------------------------------------------------------------------
[2017-07-06 18:38:22] spam2 at rhsoft dot net

frankly people should *really* stop using relative paths at all for configurations - subscribe to
bugtraq@securityfocus.com and it don't take that long to realize how stupid such configurations
are

------------------------------------------------------------------------
[2017-07-06 18:27:06] ab@php.net

@sailormax at inbox dot lv are you sure your php dir is not on PATH?

@requinix the explanation is not correct. It never worked the way it'd search relative to the
binary image directory, and unlikely ever will. See this docs

https://msdn.microsoft.com/en-us/library/windows/desktop/ms682586%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
https://msdn.microsoft.com/en-us/library/windows/desktop/ms684175%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

In particular, this quote

[start]
The first directory searched is the directory containing the image file used to create the calling
process (for more information, see the CreateProcess function). Doing this allows private
dynamic-link library (DLL) files associated with a process to be found without adding the
process's installed directory to the PATH environment variable. If a relative path is
specified, the entire relative path is appended to every token in the DLL search path list. 
[end]

Disregarding that, the patch is a really breaching change. The name like
"php_php_bz2.dll.dll" tells, it doesn't even check the ext filename already has a
suffix. More breaches are to expect on Windows

Thanks.

------------------------------------------------------------------------
[2017-07-06 15:11:47] requinix@php.net

(...and tsrm_win32_access looks relative to the current working directory.)

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

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


--
Edit this bug report at https://bugs.php.net/bug.php?id=74866&edit=1


Thread (14 messages)

« previous php.bugs (#209872) next »