Open_basedir problem making files

i have a script which creates a folder to store a users pictures in, its a registration script. it is php. well, I had had trouble with this open_basedir restriction lat night, and am having it again, but now I REALLY can’t fix it… I don’t understand the problem, I am making it in my folder what’s wrong here?
this is the code:
mkdir ($_SERVER[‘DOCUMENT_ROOT’] . ‘/pics/pending/’ . $userid, 0777);
mkdir ($_SERVER[‘DOCUMENT_ROOT’] . ‘/pics/pending/’ . $userid . ‘/thumbs/’, 0777);
copy ($_FILES[‘imagefile’][‘tmp_name’], $_SERVER[‘DOCUMENT_ROOT’] . ‘/pics/pending/’ . $userid . ‘/’ . $_FILES[‘imagefile’][‘name’])

also do i need to set it to 755 or soemthing and not 777?

oh this is the error:
Warning: open_basedir restriction in effect. File is in wrong directory in /home/.padrino/thecheat/ on line 358

I get that 3 times.
any ideas?