yes good point...
function createfolder($dirpath,$nufolder){
if (!file_exists($dirpath.'/'.$nufolder))
{
$dirpath.='/';
$oldumask = umask(0);
if (!mkdir("$dirpath{$nufolder}", 0777)) $failmsg='Directory not created';
umask($oldumask);
}
if ($failmsg) return $failmsg;
}
the above creates directories owned by apache...
but on one domain I CAN upload to them but on the other I cannot
- the only difference is the directory depth
the relevant part of image upload script is:
createfolder(($rt_dir.$ddir_arr[$i]),$ref_id);
$dst = ImageCreateTrueColor($opwd,$opht);
ImageCopyResampled($dst, $src, 0, 0, 0, 0,$opwd,$opht,$wd,$ht);
ImageJpeg($dst, $rt_dir.$ddir_arr[$i].'/'.$ref_id.'/'.$new_file_name, 75);
ImageDestroy($dst);
I have the ftp workaround running ok but it's still odd