Page 1 of 1

mkdir to a share!?!?!

Posted: Tue Nov 04, 2003 12:19 pm
by terji
I'm running php on a IIS.
Is it possible to create a directory on a share?

Code: Select all

mkdir("\\\\some\\dir&quote; 0700);

Posted: Tue Nov 04, 2003 1:00 pm
by Gen-ik
Not 100% sure but I think you need to CHMOD the folder to 777 for public reading and writting.... might be wrong though.

Code: Select all

<?
$newDir = "public_stuff";
$setDir = mkdir($newDir, 0777);

if($setDir)
{
    echo "New Directory <b>{$newDir}</b> created.";
}
else
{
    echo "There was a problem creating the new <b>{$newDir}</b> Directory.";
}
?>

NOPE - didn't work!

Posted: Tue Nov 04, 2003 1:13 pm
by terji
That didn't work - the mkdir returns false..

However this works:

Code: Select all

shell_exec("mkdir \\share\on\network");
BUT this only works on my test servers not on the live site :?

I'm guessing that this is a permissions problem - I've added Everyone, IUSR and IWAM to have full permissions but it still doesn't work....

:?: :?: :?:

Posted: Tue Nov 04, 2003 3:52 pm
by Gen-ik
Hmmm... dunno then sorry. I'm an Apache/PHP man myself.