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.
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.
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! :D
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
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.
Had this problem too, and danoph's instructions above worked perfectly for me. Fixed! Many thanks.
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!?
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.
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
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. :-)
This fixed it for me:
1) create folders in your site root
/tmp
/wwwtmp
2) set folder permissions to 777
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!
You must log in to post.