|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-09-13 09:33 UTC] xavier at sdv dot fr
Description:
------------
With php 5.2.4 if $pathname has a trailing /, mkdir($pathname) don't work. This is a new behavior, it was working in php 5.2.3
Reproduce code:
---------------
<?
echo mkdir ("toto/")
?>
Expected result:
----------------
1
Actual result:
--------------
Warning: mkdir() [function.mkdir]: Unable to access toto/ in /www/root/default_vhost/a/index.php on line 2
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 08:00:01 2025 UTC |
Open basedir and safe mode are in effect, as you can see in the phpinfo But they are not relevent. The mkdir fails within the allowed path, with corrects uid/gid. If it was an open_basedir or safe_mode problem, mkdir("foo") whould fail like mkdir("foo/"). But this is not the case. mkdir("foo") works, mkdir("foo/") doesn't. I even try the code with de CLI and a void php.ini, I have the same error. With exactly the same configuration and PHP 5.2.3, both mkdir("foo") and mkdir("foo/") are working