• Hey!

    I get the error message below when trying to upload an image.

    I have recently updated from 3.0.1 to 3.3.1. I have also installed All in one SEO and Simple Facebook Connect and changed the blog title. I have tried to change the title back and deactivate the plugins without any result.

    I’m very thankful for help.

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/tmp//Helle_Rosa.tmp) is not within the allowed path(s): (/home/web/wno15417:/var/tmp:/usr/local/lib/php:/usr/local/share/pear) in /usr/home/web/wno15417/teodortomter.no/wp-includes/functions.php on line 2340

    Warning: touch() [function.touch]: SAFE MODE Restriction in effect. The script whose uid/gid is 1722/80 is not allowed to access /tmp owned by uid/gid 0/0 in /usr/home/web/wno15417/teodortomter.no/wp-admin/includes/file.php on line 177

    Dismiss “Helle_Rosa.jpg” has failed to upload due to an error
    The uploaded file could not be moved to /usr/home/web/wno15417/teodortomter.no/wp-content/uploads/2012/01.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You need to contact your hosts. These warnings relate to your server’s current configuration.

    Thread Starter teddyen

    (@teddyen)

    That is the reply I’ve seen on all posts regarding those errors, but it’s hard to believe as the timing of the error cohere with my WP update and installation of SEO and SFC plugins. The host don’t report to have changed anything on their servers either, and I’ve used them for six years now. I’ve also read that some people have tracked the error to a bad theme, so even though the error message seems to be related to the server’s settings, it could be something else causing it?

    I will give them a call to hear if they’ve changed anything anyway, but I highly doubt it.

    Any other suggestions?

    The host don’t report to have changed anything on their servers either, and I’ve used them for six years now.

    Hmm… servers can change at any time – even with the best of hosts. I’ve had the odd “Whoops!” moment with my hosts and I’ve been using them for almost 10 years. What I can say, with certainty, is that the warnings relate to your server and not to anything internal to WordPress.

    Thread Starter teddyen

    (@teddyen)

    Hmmm. Okay, I don’t really have any knowledge to argue with that, other that what I’ve read. However, I run another WordPress site at the same host, and that works just fine. Thanks for the headsup regarding server changes, I’ll keep that in mind for the future as well.

    What about this guy, he had the exact same problem after an WP update, and solved it by defining his temp dir as an constant in the wp-config. (http://web.archive.org/web/20100914122822/http://www.dzuchara.com/wordpress-upgrade-bug-fix)

    I tried adding “/var/tmp/” as suggested, which got rid of the open_basedir error, but not the SAFE MODE restriction error.

    Thread Starter teddyen

    (@teddyen)

    I added

    define (‘WP_TEMP_DIR’, ‘/usr/home/web/wno15417/phptempfolder/’);

    (not the actual path, but it refers to a folder I can access through ftp)

    to wp-config, chmodded the folder to 777 and the whole problem was solved. Does this compromise security, or impose any other problems?

    Yes, 777 is generally a bad idea, unless you are doing it for a quick fix. Most shared hosting environments will allow you to edit your php.ini file. You can disable open-basedir for certain directories here. As far as safe mode, I believe you can change that with an .htaccess file.

    It worked for me too!
    I’m also upgraded (not so) recently to WP 3.3.1, and I just noticed I got that same annoying error.

    So I created a new ‘tmp’ folder somwhere inside the WP instalation
    set it to 777 mode,
    added:
    define ('WP_TEMP_DIR', '/path/to/tmp/');

    and voila!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘SAFE MODE and open_basedir restriction. Uploading media after 3.0.1-3.3.1 update’ is closed to new replies.