Possible Duplicate:
PHP mkdir and apache ownership
EDITED TO REFLECT NEW PROBLEM:
Thanks to your help I can create a directory within a directory recursively, but I am unable to create multiple folders within those created folders.
Code:
$timelineID = trim(mysql_prep($_POST['timelineID']));
mkdir("timelines/{$timelineID}/audio", 0777, true);
mkdir("timelines/{$timelineID}/image", 0777, true);
mkdir("timelines/{$timelineID}/product", 0777, true);
Again, the first mkdir() executes successfully, the second one does NOT.
Error: Warning: mkdir() [function.mkdir]: SAFE MODE Restriction in effect. The script whose uid/gid is 206601/206601 is not allowed to access (the directory I just made) owned by uid/gid 25000/25000 in (file.php) on line 13