• 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.

Viewing 15 replies - 1 through 15 (of 22 total)
  • Thread Starter civmatt

    (@civmatt)

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

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

    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)

    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! ??

    i can’t post images?

    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.

    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!

    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.

    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???

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

    Hope to be useful

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

    twitter: borsaronero

    Bye

    nope still nothing. I have “tmp” directories all over my site now…

    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…

    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.

    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.

    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.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Getting ‘Missing a temporary folder.’ message uploading image’ is closed to new replies.