#43276 [Opn->Asn]: mkdir with trailing slash (still) fails under safe_mode

From: Date: Wed, 14 Nov 2007 23:38:33 +0000
Subject: #43276 [Opn->Asn]: mkdir with trailing slash (still) fails under safe_mode
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-119665@lists.php.net to get a copy of this message
ID: 43276 Updated by: jani@php.net Reported By: ajakum at inode dot at -Status: Open +Status: Assigned Bug Type: Directory function related Operating System: Debian Sarge 3.1 PHP Version: 5.2CVS-2007-11-13 (snap) -Assigned To: +Assigned To: iliaa New Comment: Ilia, you claimed to have fixed this? :) Previous Comments: ------------------------------------------------------------------------ [2007-11-13 12:01:09] ajakum at inode dot at 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 this bug report at http://bugs.php.net/?id=43276&edit=1

« previous php.bugs (#119665) next »