WordPress.org

Ready to get started?Download WordPress

Forums

Can't upload images (7 posts)

  1. Guntis
    Member
    Posted 2 years ago #

    I upgraded WP to version 3.3.1 and now I can't upload images anymore. This is what I get:

    Warning: touch() [function.touch]: SAFE MODE Restriction in effect. The script whose uid is 1027 is not allowed to access /tmp owned by uid 0 in /home/homepage/public_html/wp-admin/includes/file.php on line 177
    Dismiss“20111224.jpg” has failed to upload due to an error
    The uploaded file could not be moved to /home/homepage/public_html/wp-content/uploads/2012/02.

    I am not allowed to take SAFE MODE off.
    /wp-content/uploads/ folder and subfolders have 777 rights.
    Any suggestions?

  2. ragzor
    Member
    Posted 2 years ago #

    "is not allowed to access" somethings up with ur permissions :/

  3. kmessinger
    Volunteer Moderator
    Posted 2 years ago #

    Contact your host. Maybe an ownership problem. /tmp owned by uid 0 says the temp directory is owned by root.

  4. Guntis
    Member
    Posted 2 years ago #

    "Contact your host. Maybe an ownership problem. /tmp owned by uid 0 says the temp directory is owned by root."

    Host is me :-) In previous WordPress version 3.1.x I hadn't this problem. It all started after updating to the latest version 3.3.1. I don't know where to change what…

  5. kmessinger
    Volunteer Moderator
    Posted 2 years ago #

    I don't know a lot about servers but your server is set for the directories to be owned by apache, or root, etc. while wp needs them to be owned by you.

    Maybe it is the safe mode setting.
    http://php.net/manual/en/features.safe-mode.php

  6. Lew Ayotte
    Member
    Posted 2 years ago #

    Guntis, I just ran into this same problem. Here was the solution I found:

    Create a fold in your WordPress directory (I created one named "temp"), then edit your wp-config.php and add a line like this to the bottom:

    define( 'WP_TEMP_DIR', '/home/directory/user/public_html/temp' );

    it needs to be the full path to your temp dir.

    This fixed it for me.

  7. jellyroll4264
    Member
    Posted 1 year ago #

    @ layotte

    Did you name it temp.php or temp.txt or just temp?

    Thanks, trying this solution. So far no joy

Topic Closed

This topic has been closed to new replies.

About this Topic