[php-src] Issue #8402: file_exists(): open_basedir restriction in effect
| From: | cmb69 | Date: | Wed, 20 Apr 2022 11:11:10 +0000 |
| Subject: | [php-src] Issue #8402: file_exists(): open_basedir restriction in effect | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-241092@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8402
Comment Author: cmb69
Like I already said in https://bugs.php.net/bug.php?id=52065#1621507683,
there is no clean and backward compatible way to fix this. The problem is that
php_stat() is called by different functions, and for some the open_basedir warning is
important, while for others it should be suppressed. The clean way to solve this would be to add a
warn parameter to php_stat(), and to forward this to
php_check_open_basedir_ex(), but that would break the API of php_stat().
Introducing php_stat_ex() would be possible, but a lot of extension would not call that
function, and even for php-src that would require modifications which I wouldn't want to do for
any of the stable versions. A global flag might be a viable workaround, but doesn't look like a
clean solution.