[php-src] Issue #8402: file_exists(): open_basedir restriction in effect

From: Date: Wed, 20 Apr 2022 09:57:56 +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-241088@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8402 Comment Author: cmb69 Indeed, this is related to [bug 52065](https://bugs.php.net/bug.php?id=52065). This case is particularly about the wildcard character ? (* exhibits the same behavior). Since the algorithm to resolve the realpath (tsrm_realpath_r()) uses [FindFirstFileExW()](https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-findfirstfileexw), which inherently supports these wildcards, we [bail out early if a filename contains these characters](https://github.com/php/php-src/blob/8f02d7b7e499490312969cdfa9a3a81b9458595a/Zend/zend_virtual_cwd.c#L1100-L1104). This is correct per se, since such files can't exists, but then we hit the issue mentioned in the other bug report. So, in my opinion, this case (wildcards in the filename) is a documentation issue.

« previous php.bugs (#241088) next »