[php-src] Issue #8310: Local directory settings are loaded for scripts from another directory on PHP 8.1.4 (Windows)
| From: | guyasyou | Date: | Wed, 06 Apr 2022 06:30:06 +0000 |
| Subject: | [php-src] Issue #8310: Local directory settings are loaded for scripts from another directory on PHP 8.1.4 (Windows) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240690@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8310
Author: guyasyou
### Description
Since PHP 8.1 local settings of a workdir (from registry of windows) are loaded for scripts from
another directory (Case D in STR).
Is it bug or new feature of PHP 8.1?
STR:
- Create directory like C:/Inetpub/vhost/php81.tld/httpdocs
- Create index.php with phpinfo() in the directory
- Set local config "**open_basedir=test**" for the directory by registry of windows
- Create index.php with phpinfo() in another location
Case A (**PHP 8.0.14**):
> cd C:/Inetpub/vhost/mydomain.tld/httpdocs
> php -f index.php | grep open_basedir
Actual result: open_basedir = test
Case B (**PHP 8.0.14**):
> cd C:/Inetpub/vhost/mydomain.tld/httpdocs
> php -f /another/index.php | grep open_basedir
Actual result: open_basedir = null
Case C (**PHP 8.1.4**):
> cd C:/Inetpub/vhost/mydomain.tld/httpdocs
> php -f index.php | grep open_basedir
Actual result: open_basedir = test
Case D (**PHP 8.1.4**):
> cd C:/Inetpub/vhost/mydomain.tld/httpdocs
> php -f /another/index.php | grep open_basedir
Actual result: open_basedir = test, but expected NULL (like php 8.0)
### PHP Version
PHP 8.1.4
### Operating System
Windows Server 2019