I got this message when I was adding a product to my store. It makes no sense to me whatsoever?

warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 32537 is not allowed to access /tmp owned by uid 0 in /home/sudofixc/public_html/ubercart/includes/file.inc on line 288.

Comments

bwv’s picture

See this thread for previous discussion:

http://drupal.org/node/182058

----------------------------------------------------------------------
http://www.bwv810.com/

I am a writer and researcher. In my spare time I build websites with Drupal.
Je peux communiquer en français. / Я могу общаться на русском языке.

slarti’s picture

The thread referenced above discusses safe mode issues with accessing the files directory if the owner of the script and the owner of the web server process differ.

However, if the only error messages are about accessing /tmp (because it's owned by root) then you can get rid of them by specifying a custom temp directory in the page at /admin/settings/file-system (This directory obviously must be somewhere in the directory tree which you can access, and you probably have to create it manually)

xayberoptix’s picture

Thanks slarti! I did a migration to a new server environment and I was having trouble with this. I didn't even think to check the file-system setting; and so after I did, I saw the problem. :)

alextronic’s picture

yes sir, the error disappeared!

smasty’s picture

Thanks very much, this did it for me too!

vegantriathlete’s picture

I guess my webhost must just have recently turned this on, as I wasn't having any issue before. But, once it started, all I had to do was google the error message and drupal.org came to the rescue!

I eliminated the warning message by creating sites/all/temp. Thanks for the tip!

Keywords for search engines: SAFE MODE, /tmp, Restriction

vegantriathlete’s picture

As it turns out, SAFE MODE was breaking other things I needed to be able to run on my site (like installing modules). So, I contacted my web host and asked them to change my setup to set safe_mode = off for all of my domains hosted on their servers. They changed my php.ini (I am not allowed to do so myself) and this resolved the issues.

Saoirse1916’s picture

I tried the other two fixes but what finally solved it for me was changing the temp directory in admin/settings/file-system to tmp instead of /tmp.