|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79949 if use filename as folder then shows restriction warning
Submitted: 2020-08-10 06:12 UTC Modified: 2020-08-10 07:09 UTC
From: abolfazl dot ziaratban at gmail dot com Assigned:
Status: Duplicate Package: *Directory/Filesystem functions
PHP Version: 7.4.9 OS: CentOS 8
Private report: No CVE-ID: None
 [2020-08-10 06:12 UTC] abolfazl dot ziaratban at gmail dot com
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 :

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

Expected result:
no a restriction warning.

Actual result:
shows a restriction warning.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-08-10 07:09 UTC]
-Status: Open +Status: Duplicate
 [2020-08-10 07:09 UTC]
Duplicate of bug #52065
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Mar 31 23:03:43 2023 UTC