thats a generic error thats present in wp (admin-functions.php), and unfortunately beyond what it says (cannot write to disk), its not too helpful is it?
Make sure you have an upload folder defined, make sure the upload folder permissions are correct, make sure the parent folders permissions are correct.
Make sure your host allows file uploading via php.. that is something you can check for yourself via phpinfo();
and just a note, this has nothing to do with the database.
for the phpinfo thing:
1. create a textfile
2. inside the textfile put the following:
<?php phpinfo(); ?>
3. upload the textfile with the extension .php, something like checkme.php .. whatever suits you..
4. open the file in your browser while its on your site.
Under “PHP Core” you will see a bunch of settings. The one you are looking for is : file_uploads. It will say on or off (2 columns)
On is good and atleast will insure thats not the problem. Off means your host has disabled uploads via php, in which case you may be able to manually override that setting with a local php.ini in your directory (or not)
Thanks for the quick reply.
I have the uploads folder defined and have checked the permissions. Everything appears to be correct.
phpinfo tells me that file_uploads is on.
Still not able to upload files…
/var partition on your server is full or you hav exceeded your assigned quota. You can ask your host to take a look at this 2 things and your problem should get solved.
Thanks, I’ve asked them to take a look at it. I’ll post their response when I get it.
Ok, heard back from my host. They’ve made a few changes to my /var partition, but it hasn’t fixed the problem as I still get the same error as before. Any other ideas?
After some more research, my host tried changing the php error reporting to 2039 (not sure what it was set to before). Now I get a new error:
File is empty. Please upload something more substantial.
I’ve tried uploading a variety of different sized images, but I always get that error. I did a search on the error and found that for some it occured if file_upload was off, but I just checked mine again and it’s clearly set to “on”.
Still, this does feel a bit like progress… at least it’s not telling me it can’t write the file anymore.
Well, it turns out the specific server my site was hosted on had a problem. My host moved my site to a new server and now everything works fine.
Create TMP folder in main direcotry of your blog. Leave it empty. Work’s for me.
WordPress 2.2.1, hosting: home.pl (Poland).