php.net |  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: abolfazl dot ziaratban at gmail dot com
New email:
PHP Version: OS:

 

 [2020-08-10 06:12 UTC] abolfazl dot ziaratban at gmail dot com
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-08-10 07:09 UTC] requinix@php.net
-Status: Open +Status: Duplicate
 [2020-08-10 07:09 UTC] requinix@php.net
Duplicate of bug #52065
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 19:01:29 2024 UTC