Apologies in advance if i'm being too dumb here, new to drupal...

I'm trying to post a story with attached image file - i get the following error message/warning when i attempt to upload my image:

warning: move_uploaded_file() [function.move-uploaded-file]: SAFE MODE Restriction in effect. The script whose uid/gid is 32733/32733 is not allowed to access /tmp/tmp_u7PbFi owned by uid/gid 99/99 in /mounted-storage/home72a/sub003/sc41782-QAJM/www/drupal/includes/file.inc on line 240.

the permissions on file & tmp directories are set to 777,
is this just a safe mode issue? do i need to turn it off, and if i do so, will that leave me at risk?

I've searched around and can't find any information relating specifically to this issue, apologies if that's not the case.

I'm using windows XP on the PC & dreamweaver 8 to manage my files.

Comments

cog.rusty’s picture

By all means disable "safe mode" if you have control over your server. Very few hosts use it, mostly ISPs, and it has been removed from the upcoming PHP 6.

http://php.net/features.safe-mode

What this error message says is that Drupal, whose file owner is you, cannot access 'files' or '/tmp' whose owner is user apache. (Apparently Drupal created the 'files' directory as user apache).

It is an ownership problem, no matter what the permissions. It forbids a script to write into a directory not owned by the script's owner.

sgwood’s picture

Yes safe mode should be turned off.

The "Temporary directory" should also be correctly set.

More details here:
http://drupal.org/node/84405#comment-872211