I am using the mkdir() to make a new directory, which works. But when I try to upload files(images) to the dir, it gives me the following error:
Warning: imagegif() [function.imagegif]: SAFE MODE Restriction in effect. The script whose uid is 878043 is not allowed to access (dir)/galleries/ny owned by uid 2001 in /www/.../formfunctions.php on line 208
I know what the problem is, but not how to solve it. When I use the mkdir() to create the dir it is given owner id: 2001 and group id: 2001. The owner id should be: 878043 (I was able to see this through Filezilla)
Here is my code for creating the new dir:
$albumName = $_POST['albumName'];
$url = $_GET['url'];
if (!is_dir("galleries/".$albumName) && $albumName != "") {
// Hvis albumnavnet er ledigt laves albummet
mkdir("galleries/".$albumName);
uploadImagesToAlbum($albumName, $url);
chmod('galleries/'.$albumName, 0777);
} else {
// Hvis albumnavnet er optaget sendes man tilbage og faar en meddelelse
header('location: '.$url.'?mes=albumOccupied');
}
So my question is: can I set the owner id through my php code?