Hey there - I went through this error for a full day.
Note: I wasn't upgrading, I was moving the site to another box. Importing the files through XML were leaving 300 posts behind... and duplicating comments every time I retried to import. So to go around this, I had to go into MySQL and take care of it manually.
Once I did - I came across the same error message. I tried all the suggestions you guys had. Nothing worked.
Here's what caused my problem, hopefully it will help someone.
The moron that installed the first version here, actually gave the secret key... not ignoring it - shocked me. So moving the entire DB over - and changing the options table to refer to the new URL - didn't work.
Deleted the DB and started over. I moved all tables except for the options table. Same message. Furious.
So, my fix came down to these conditions:
- Create the brand new site, with the table prefix to match (my server guy picked a "wpUS_" prefix, our windows version wasn't case sensitive, but the new Linux version... was.
- Move the old wp_config file over, after changing the host/user/db fields in it for the new box.
- Move all the tables, except for the options table.
- Go into options table, and fix the fields that referenced the old site.
Then my uploads would work. CHMOD 777, didn't work. It changed the permission to 777, but the upload still didn't work. Furious.
Luckily I have root access to the box. I SSH'd to it, and noticed that my apache user wasn't the owner. The FTP account was, because I moved the files through it. I made the Apache account the owner for it, and then went back to 755, and it worked. And it's secure again.
Like I said, not exactly what you're going through, but the step I would go through if I were you - were to backup my data to SQL, initialize with a clean installation, and then move the posts, comments, taxonomy and meta data manually. I don't trust upgrades for beans. With any software.