Same here. Using WP version 3.5.1 with the a custom theme (from a trusted source) on Godaddy.
Installed Plugins include… (not saying any of these are at fault)
AdRotate
Akismet
Easy Contact
Hello Dolly
Jetpack by WordPress.com
W3 Total Cache
Widget Logic
WordPress Importer
WP-PageNavi
Yoast Breadcrumbs
Aside from the modified header.php file, the one suspicious file I found is named wp-comments-get.php in the base directory. It’s 871 bytes and has mostly lines of code that look like this…
[Spam code removed – please do not post that here]
To start with, I plan on clening the spammy stuff from the header.php file and deleting the file named wp-comments-get.php. Then, I suppose I’ll delete most of those plug-ins and keep a sharp eye out for any re-ocurrences.
Thank you @ejesse!
After trying every other suggestion, I found yours, which worked for me.
I added the two lines you suggested to my php.ini, restarted Apache, and now theme installs work as they should.
Thanks again!