go to bug id or search bugs for
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 184.108.40.206.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.
mkdir('myhomefolder/',0770); // does not work
//mkdir('myhomefolder',0770); // would work
myhomefolder should get created (=no error)
Warning: mkdir(): Unable to access myhomefolder/ in /home/foo/test.php on line 2
Add a Patch
Add a Pull Request
Ilia, you claimed to have fixed this? :)
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.