Note Submitter: clive at cliveread dot me dot uk
----
Hello, I am having a slight problem. What I'm trying to do
is to have my site automaticly create a Directary, CHMOD it
to 0777 and then create 2 other folder's inside the original
one created and also CHMOD them to 0777 like the first. This
is the php code im using that seems to work.
mkdir($_SERVER['DOCUMENT_ROOT']."/test/1", 0755);
chmod($_SERVER['DOCUMENT_ROOT']."/test/1".$name,
intval(0777, 8));
That code works and creates the first folder I want to make,
but if i do it a secand time to create the folder inside
that one using the same code e.g.
mkdir($_SERVER['DOCUMENT_ROOT']."/test/1", 0755);
chmod($_SERVER['DOCUMENT_ROOT']."/test/1".$name,
intval(0777, 8));
mkdir($_SERVER['DOCUMENT_ROOT']."/test/1/2",
0755);
chmod($_SERVER['DOCUMENT_ROOT']."/test/1/2".$name,
intval(0777, 8));
I get this...
Warning: mkdir() [function.mkdir]: SAFE MODE Restriction in
effect. The script whose uid is 32313 is not allowed to
access /home/xxxx/public_html/test/1 owned by uid 99 in
/home/xxxx/public_html/test.php on line 11
Warning: chmod() [function.chmod]: Unable to access
/home/xxxx/public_html/test/1/2 in
/home/xxxx/public_html/test.php on line 12
Warning: chmod() [function.chmod]: No such file or directory
in /home/xxxx/public_html/test.php on line 12
Now I can't seem to work out why its not making the 2nd
folder with CHMOD 0777 because I beleave that if it works
once it should work again
Any suggestions?
Thanks
Clive
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|