Hi

Just installed Drupal 4.5 RC :-) I have a small issue with the SAFE MODE restriction. Drupal logs the following error:

Message warning: mkdir(): SAFE MODE Restriction in effect. The script whose uid/gid is 2797/80 is not allowed to access /tmp owned by uid/gid 0/0 in /usr/home/web/web34197/drupalcvs/includes/file.inc on line 77.

It seems that Drupal tries do execute a MKDIR command. A tmp folder IS created, BUT, its unaccessable to me using FileZilla FTP. I even can't change folder attributes.

I created a "temp" folder using FTP, and confugured Drupal accordingly, so it's not critical - it's still makes the drupal setup procedure less "sleek" though.

Kind regards
Bjarne, Denmark

Comments

netbjarne’s picture

I have replaced the release candiate with the final Drupal 4.5, and I'm still having a hard time with SAFE MODE restrictions. This wasn't an issue with Drupal 4.4. So, if you know that I'm doing something wrong, or this question already has been answered, please give me a hint - cause my searchs haven't given me any clues.

Kind regards
Bjarne

junyor’s picture

I'm having a similar problem, though it appears to be the 'file' directory that's causing me grief. I'm getting the following error whenever I go into theme settings:

warning: mkdir(): open_basedir restriction in effect. File(/files) is not within the allowed path(s): (/dh/web/phpmyadmin:/tmp:/dh/solidclient:/usr/local/lib/php:/home/junyor:/home/.jackobydryer/junyor) in /home/.jackobydryer/junyor/weblog.timaltman.com/includes/file.inc on line 77.

I have never been able to figure out the correct location of the 'file' directory and would appreciate any help available.

carlos.er’s picture

Hi Bjarne

I correct this problem removing de slash "/" before the "tmp" folder name in the field "Temporary directory:" of the settings menu.

I hope that it help you.

regards,

Carlos Eduardo.

herkermer’s picture

Removing the / worked for me, thx Carlos

------------------------------
Wimbly, Wambly, Wombly

jgarite’s picture

I had the same problem, but when I tried to remove the "/" I got this error:
warning: mkdir(tmp): Permission denied in /home/virtual/site39/fst/var/www/html/articlemanager/includes/file.inc on line 86.

can someone help?

jgarite’s picture

Now when I replaced the "/" it says "The directory tmp does not exist." How can I fix this?

goncalo.dumas’s picture

you must create the tmp directory on your server, maybe via FTP... and set it's attributes to chmod 777 (I think!).
As for the other mkdir error, that's because you got the PHP safe mode on... please contact your host and find out how to turn safe mode off.

reknaw’s picture

This is the third Drupal I have installed and this caught me out! Perhaps as a suggestion to developers, we could package an empty and attributed tmp and files folder witihn the main drupal pack, save having to add and CHMOD them ourselves. Just a thought ; )

BTW, I am using SmartFTP, which is brilliant and free! Simply transfer the files, add the two folders and right-click to add their links. hope that this helps.

-----------------------------------------

www.netquiz.co.uk

hf’s picture

For me, the solution was to turn off safe mode. I asked the provider to do it, and since then everything is ok.
(Drupal 4.7.3)

michelle’s picture

You're responding to a two year old, two version old post. If he hasn't figured it out by now, he's probably moved on. :)

Michelle

--------------------------------------
My site: http://shellmultimedia.com