#43276 [NEW]: mkdir with trailing slash (still) fails under safe_mode
| From: | ajakum at inode dot at | Date: | Tue, 13 Nov 2007 12:01:09 +0000 |
| Subject: | #43276 [NEW]: mkdir with trailing slash (still) fails under safe_mode | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-119596@lists.php.net to get a copy of this message | ||
From: ajakum at inode dot at
Operating system: Debian Sarge 3.1
PHP version: 5.2CVS-2007-11-13 (snap)
PHP Bug Type: Directory function related
Bug description: mkdir with trailing slash (still) fails under safe_mode
Description:
------------
Experienced the same issue as in bug #42739 with the current CVS snapshot
php5.2-200711130930 even though it's supposed to be fixed in 5.2.5
according to the changelog.
mkdir() fails under safe_mode conditions if the path ends in a slash.
Fixed temporarily by reverting revision 1.74.2.9.2.33 of
TSRM/tsrm_virtual_cwd.c "Consistent handling of trailing slash".
Running on a completely fresh Debian Sarge install with
php5.2-200711130930 from snaps.php.net. Only change was activation of
safe_mode in order to reproduce the problem.
Reproduce code:
---------------
<?php
mkdir('myhomefolder/',0770); // does not work
//mkdir('myhomefolder',0770); // would work
?>
Expected result:
----------------
myhomefolder should get created (=no error)
Actual result:
--------------
Warning: mkdir(): Unable to access myhomefolder/ in /home/foo/test.php on
line 2
--
Edit bug report at http://bugs.php.net/?id=43276&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43276&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43276&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43276&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43276&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43276&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=43276&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43276&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43276&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43276&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43276&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43276&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=43276&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=43276&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43276&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43276&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43276&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43276&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43276&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43276&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43276&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43276&r=mysqlcfg