$siteGalleryUserPath when it is made by PHP dose not give 0777 access for $destination to be made.
| From: | Philip J. Newman | Date: | Fri, 21 Mar 2003 03:43:01 +0000 |
| Subject: | $siteGalleryUserPath when it is made by PHP dose not give 0777 access for $destination to be made. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-140536@lists.php.net to get a copy of this message | ||
MY ERROR:
Warning: mkdir(/home/newmanpj/public_html/galleries/philip/20030320223553) [function.mkdir]:
Permission denied in /home/crushme/public_html/siteadmin/upload_set_step3.php on line 72
MY PROBLEM:
$siteGalleryUserPath when it is made by PHP dose not give 0777 access for $destination to be made.
~~~~~~~~~~~~ SNIP
$datestamp = date("YmdHis");
$sUser="philip";
//Variables for Directories
$siteGalleryPath="$sitePath/$siteGalleriesInclude";
$siteGalleryUserPath="$siteGalleryPath/$sUser";
$destination = "$siteGalleryUserPath/$datestamp";
$dir_path = "/$siteGalleriesInclude/$sUser/$datestamp";
//If the Directory for UserName already exists, don't create it.. else create it..
if (file_exists("$siteGalleryUserPath")) {
echo"<B>Directory for User, $sUser, Already
Exists...</B><br><br>";
} else {
echo"<B>Directory for User, $sUser, Doesn't Exist..
Creating..</B><br><br>";
mkdir("$siteGalleryUserPath",0777);
}
//Code to Add the gallery photoset directory here..
//(add a directory $datestamp under the username dir..
mkdir("$destination",0777); // LINE 72 from error above.
~~~~~~~~ end snip
------
Philip J. Newman.
Head Developer
info@philipnz.com