Bug #77187 [NEW]: mkdir() fails to create dir after using some func-s on the parent dir
| From: | batonxleba at gmail dot com | Date: | Thu, 22 Nov 2018 23:37:53 +0000 |
| Subject: | Bug #77187 [NEW]: mkdir() fails to create dir after using some func-s on the parent dir | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-218089@lists.php.net to get a copy of this message | ||
From: batonxleba at gmail dot com
Operating system: gentoo
PHP version: 7.2.12
Package: Directory function related
Bug Type: Bug
Bug description:mkdir() fails to create dir after using some func-s on the parent dir
Description:
------------
mkdir () does not create a subdirectory and generates an error when I
try to create it in a directory that has the same name as the file that
was deleted before this but any of the is_dir / file_exists /
is_writable functions were applied to it.
if i comment line 5 in example below script will work fine.
my cli php
PHP 7.2.10 (cli) (built: Nov 10 2018 11:44:18) ( ZTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.10, Copyright (c) 1999-2018, by Zend
Technologies
Test script:
---------------
#!/usr/bin/php
<?php
exec('> vpupkin');
if(is_dir('vpupkin'))print 'true'."\n";
exec('rm -f vpupkin');
mkdir('vpupkin',0700);
mkdir('vpupkin/'.date("d.m.Y"),0700);
?>
Actual result:
--------------
dev ~/testftp # rm -r vpupkin; ./t.php
PHP Warning: mkdir(): No such file or directory in /root/testftp/t.php
on line 9
--
Edit bug report at https://bugs.php.net/bug.php?id=77187&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77187&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77187&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77187&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=77187&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=77187&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=77187&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=77187&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=77187&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=77187&r=support
Expected behavior: https://bugs.php.net/fix.php?id=77187&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=77187&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=77187&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=77187&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77187&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=77187&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=77187&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=77187&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77187&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=77187&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=77187&r=mysqlcfg