Bug #78806 [Opn->Dup]: Wrong open_basedir warning

From: Date: Tue, 12 Nov 2019 16:14:08 +0000
Subject: Bug #78806 [Opn->Dup]: Wrong open_basedir warning
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223688@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78806&edit=1 ID: 78806 Updated by: requinix@php.net Reported by: michael dot vorisek at email dot cz Summary: Wrong open_basedir warning -Status: Open +Status: Duplicate Type: Bug Package: *Directory/Filesystem functions Operating System: Windows PHP Version: 7.3.11 Block user comment: N Private report: N New Comment: More specifically, it errors if you create a path that treats a file like a directory. Duplicate of bug #52065. Previous Comments: ------------------------------------------------------------------------ [2019-11-12 15:41:23] michael dot vorisek at email dot cz Description: ------------ On Windows PHP emits a warning if file path consists of existing file and slash plus optionally anything is appended. This issue should be fixes asap as it outputs unwanted output from core function. Test script: --------------- (Windows + PHP 7.3 + PHP error reporting enabled + open_basedir set) var_dump(file_exists(__FILE__)); var_dump(file_exists(__FILE__ . '/')); Expected result: ---------------- bool(true) (no warning) bool(false) Actual result: -------------- bool(true) Warning: file_exists(): open_basedir restriction in effect. File(C:/x/test.php/) is not within the allowed path(s): (C:/x/) in xxx on line xxx bool(false) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78806&edit=1

« previous php.bugs (#223688) next »