Bug #74016 [Com]: open_basedir restriction effect when remove and create the same dir
| From: | andrew dot nester dot dev at gmail dot com | Date: | Wed, 01 Feb 2017 09:00:17 +0000 |
| Subject: | Bug #74016 [Com]: open_basedir restriction effect when remove and create the same dir | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-207085@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74016&edit=1
ID: 74016
Comment by: andrew dot nester dot dev at gmail dot com
Reported by: web_programer at mail dot ru
Summary: open_basedir restriction effect when remove and
create the same dir
Status: Open
Type: Bug
Package: Safe Mode/open_basedir
Operating System: all
PHP Version: 5.6.30
Block user comment: N
Private report: N
New Comment:
What is your open_basedir setting?
Previous Comments:
------------------------------------------------------------------------
[2017-01-30 15:32:41] web_programer at mail dot ru
Description:
------------
Fatal error: Uncaught exception 'UnexpectedValueException' with message
'GlobIterator::__construct(): open_basedir restriction in effect
When remove and create dir where script is situated.
When simply use GlobIterator on any dirs, there are no problems.
Test script:
---------------
//in testdir/test.php
$root = $_SERVER['DOCUMENT_ROOT'].'/testdir';
$filetext = file_get_contents(__FILE__);
unlink(__FILE__);
rmdir($root);
mkdir($root, 0777);
file_put_contents(__FILE__, $filetext);
clearstatcache();
$iterator = new GlobIterator($root.'/*.sql');
print_r($iterator);
Expected result:
----------------
GlobIterator Object ( [pathName:SplFileInfo:private] => [glob:DirectoryIterator:private] =>
...........
Actual result:
--------------
Fatal error: Uncaught exception 'UnexpectedValueException' with message
'GlobIterator::__construct(): open_basedir restriction in effect
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74016&edit=1