I\'ve got the following piece of code on a PHP 5.2.4 (no safe_mode) linux server:
mkdir( $path, 0777, true );
when I enter a path like:
You'll get this error if you make the silly mistake I did and pass a string, rather than the numeric literal for mode.
mkdir( $path, "0777", true ); // BAD - only creates /a/b mkdir( $path, 0777, true ); // GOOD - creates /a/b/c/d