Bug #79949 [NEW]: if use filename as folder then shows restriction warning
| From: | abolfazl dot ziaratban at gmail dot com | Date: | Mon, 10 Aug 2020 06:12:52 +0000 |
| Subject: | Bug #79949 [NEW]: if use filename as folder then shows restriction warning | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-228473@lists.php.net to get a copy of this message | ||
From: abolfazl dot ziaratban at gmail dot com
Operating system: CentOS 8
PHP version: 7.4.9
Package: *Directory/Filesystem functions
Bug Type: Bug
Bug description:if use filename as folder then shows restriction warning
Description:
------------
if used filename as folder in your path the file system
function(is_dir,is_file,file_exists and etc ...) shows a restriction
warning.
i thinks , this is a bug.
Test script:
---------------
run this codes :
root#
mkdir /test
touch /test/empty
echo "<?php var_dump(is_file('/test/empty/foo/bar'));" >
/test/index.php
echo "open_basedir = /test" > /test/php.ini
then :
root# php -c /test/php.ini /test/index.php
Warning: is_file(): open_basedir restriction in effect.
File(/test/empty/foo/bar) is not within the allowed path(s): (/test) in
/test/index.php on line 1
bool(false)
Expected result:
----------------
no a restriction warning.
Actual result:
--------------
shows a restriction warning.
--
Edit bug report at https://bugs.php.net/bug.php?id=79949&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79949&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79949&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79949&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79949&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79949&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79949&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79949&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79949&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79949&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79949&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79949&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79949&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79949&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79949&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79949&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79949&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79949&r=mysqlcfg