WordPress.org

Forums

Getting 'Missing a temporary folder.' message uploading image (23 posts)

  1. civmatt
    Member
    Posted 6 years ago #

    So I started a new installation of 2.7 and have everything in place but as soon as I try to upload an image for a post (or upload anything) I get Missing a temporary folder.

  2. civmatt
    Member
    Posted 6 years ago #

    Why is it not creating what it needs, and/or permission issue?

  3. GoyoComoVa
    Member
    Posted 6 years ago #

    I'm having the same problem. Any help is appreciated!

  4. MichaelH
    Member
    Posted 6 years ago #

    Missing a temporary folder

    That error is thrown by PHP and likely you will need to contact your host to have them specify a temporary directory (e.g. upload_tmp_dir in php.ini)

  5. dwj
    Member
    Posted 6 years ago #

    thanx MichaelH, that was the problem i had on some local installations on both Linux and Mac (didn't test on Windows) using XAMPP.

    For future reference i've made a quick how-to on my website:

    PS: this WP2.7 is really awesome good job! :D

  6. mpasetsky
    Member
    Posted 6 years ago #

    i can't post images?

  7. billbennett
    Member
    Posted 6 years ago #

    My site was working absolutely fine until earlier today, when we tried uploading photos and hit the 'Missing a temporary folder.' message for the first time.

    The site is hosted, so I can't work the fix offered by dwj.

    There is another new problem that's possibly related.

    Trying to automatically install a plug-in I get the following message:

    Warning: ftp_rawlist() [function.ftp-rawlist]: Unable to create temporary file. Check permissions in temporary files directory.

    Both these problems are for performing tasks that worked perfectly well until a few days ago.

  8. danoph
    Member
    Posted 6 years ago #

    I had this same problem and it was from WordPress working in a different directory than the root, trying to upload to a tmp folder that doesn't exist.

    If you are using WordPress 2.7, go to wp-admin/includes/file.php, and after line 260, add this line temporarily:

    echo getcwd();

    This will tell you the current working directory. If there is more than just "/", you will need to add this to your PHP temporary directory line as well instead of just the usual "/tmp"

    So, I changed my php.ini file from upload_tmp_dir ="/tmp/" to

    upload_tmp_dir ="/usr/home/usernamehere/tmp/"

    Works now!

  9. sean.erickson
    Member
    Posted 6 years ago #

    To all those experiencing the issue:
    What hosting company are you using? I am having the same issue on DiscountASP and am currently working with their support to get it resolved. If more people on their servers are experiencing the issue I'm sure it would help get this done faster.

    I'll repost when this gets resolved.

  10. moovok
    Member
    Posted 6 years ago #

    I'm using supanames.co.uk and I don't have access to my ini file nor will my hosting company change it for me. Is there any way of altering the image.php or something to change it to point directly to a folder rather than what the php.ini file has it as???

  11. borsaro
    Member
    Posted 6 years ago #

    TO RESOLVE THE PROBLEM: i just create on the root directory on server a directory named "tmp"

    Hope to be useful

    http://www.ilborsaronero.com
    facebook: borsaronero

    twitter: borsaronero

    Bye

  12. moovok
    Member
    Posted 6 years ago #

    nope still nothing. I have "tmp" directories all over my site now...

  13. moovok
    Member
    Posted 6 years ago #

    There must be something in file.php or somewhere that I can edit to make point to a direct line rather than it using some isi file...

  14. andydoc
    Member
    Posted 6 years ago #

    I have tried to edit file.php where it returns the temporary directory at line 143 at function get_temp_dir. No success - I did have 3 occasions where the error message disappeared but another error cropped up and now it is back to where it was. I had it return usr/home/usernamehere/tmp/ and the active directory.tmp but no joy. I am now waiting to hear from my host.

  15. usman435
    Member
    Posted 6 years ago #

    I am trying to upload images on site but when i click to upload images the an error comes "Unable to create directory /var/www/vhosts/mastmp3s.com/httpdocs/pics/2009/03. Is its parent directory writable by the server?"
    please help me how can i fix this prob.

  16. dpapa
    Member
    Posted 6 years ago #

    moovok: if you're using supanames, I seem to remember they have no default upload directory in their php.ini for each server. You have to set it in your control panel by going to advanced->php settings and then selecting upload_tmp_dir. You will first need to create a write-enabled folder somewhere in your site root - the '/tmp' suggested earlier here should work. I can't yet verify this as working as it can take up to 12 hours for the change to go through but I don't see why not.

    Just a thought for everyone else who can't access php.ini and doesn't have shell access - maybe you can try and set the ini value upload_tmp_dir using the php command @ini_set('upload_tmp_dir','/path/to/tmp'); using danoph's suggestion to find your current working directory path. Instead of putting it in the file.php you can try to put it in the wp-settings.php file in the wordpress root. This may not work, however, if your host, like supanames, has no value set in the php.ini for upload_tmp_dir or doesn't allow scripts to alter this value. Still, it maybe that there's another way in the host's control panel to set this value - for that you'd have to contact your own support I'd guess.

    finally, don't forget you can check the current value of upload_tmp_dir in several ways but a simple php file containing the following script should tell you all you need to know:

    <?php
    var_dump(ini_get('upload_tmp_dir'));
    ?>

    note: if it returns bool(false) it means upload_tmp_dir has no value.

  17. betsyk
    Member
    Posted 6 years ago #

    Had this problem too, and danoph's instructions above worked perfectly for me. Fixed! Many thanks.

  18. zotarstu
    Member
    Posted 6 years ago #

    Nothing has worked here for me. My hosting is thru supanames- I am about to bin wordpress as there is not much point running a site you can't upload photos to- help!, any other ideas anyone!?

  19. rickibird
    Member
    Posted 6 years ago #

    That error is thrown by PHP and likely you will need to contact your host to have them specify a temporary directory (e.g. upload_tmp_dir in php.ini)

    I took Michael H's advice on this and contacted my host, as on this particular site I couldn't see the php.ini file (it's not always visible). I explained the issue and the helpful techie changed the file in less than a minute and all is fixed.

  20. missionkerala
    Member
    Posted 6 years ago #

    My WP installation was working fine.. and allowing me to upload file. But suddenly things changed. I started getting "Missing a temporary folder" when uploading images.

    I went though the discussion above and all of them suggest changing php.ini file. I am asking why?.. it was working fine with the same settings. Suddenly what happened?

    Also I am having some other WP installations in the same server, and none of them is having the issue.

    Some one from the WP dev team please look into this... We are loosing our trust in WP.

    I am hosting my site in Yahoo... the customer support I get from there is rather poor. So can never expect them to change php.ini for me.

    BTW in my host phpinfo() says upload_tmp_dir=/tmp

  21. nattrill
    Member
    Posted 5 years ago #

    dpapa, you're a genius. I had to pay supanames £10 to setup a wordpress account last time, and then I still had to wait a month for them to fix it. That one paragraph just saved me time and money, fixed in seconds! Still had to create an uploads folder in wp-content, and give both uploads and tmp write access, but at least I started to get more meaningful error messages. :-)

  22. mtonumaa
    Member
    Posted 5 years ago #

    This fixed it for me:

    1) create folders in your site root
    /tmp
    /wwwtmp

    2) set folder permissions to 777

  23. luciehall
    Member
    Posted 5 years ago #

    I had to edit the php.ini file, and I used danoph's suggestion to find the path to /tmp that WordPress was using, in the wp-admin/includes/file.php I added
    echo getcwd();
    That gave me the very surprising path I had to put in the php.ini file. And it worked beautifully. Thank you, Danoph!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.