I have a few Drupal sites that I've been building on a shared hosting environment at GoDaddy.
They're all in their respective folders on the server - multiple installs of slightly different builds, but all D7.

One day last week, all my Drupal sites failed to accept any kind of uploads. Images, PDFs, movies being uploaded, whether through the stock image field, or Media module, or Mediafront, or CKEditor, or Rotating Banner, would all produce the following error:

• The file IMG_XXXX.JPG could not be saved. An unknown error has occurred.
• The file in the image field was unable to be uploaded.

Just tried a fresh Drupal install (DEV dated May 14, 2011) and I'm still getting above error.

Looking at the log messages under the Report section, I inspect the error titled "The file upload failed. field_imagetest_und_0", and the only other information I can discern is from a link next to LOCATION which yields a block of greek-to-me text :

[{"command":"settings","settings":{"basePath":"\/wwtester\/","ajaxPageState":{"theme":"bartik","theme_token":"4uwbhQ0wYQXSgCR-rqDK7V0K3lmUnlnvjOkL08G4lfc","css":[]},"overlay":{"paths":{"admin":"node\/*\/edit\nnode\/*\/delete\nnode\/*\/revisions\nnode\/*\/revisions\/*\/revert\nnode\/*\/revisions\/*\/delete\nnode\/add\nnode\/add\/*\noverlay\/dismiss-message\nuser\/*\/shortcuts\nadmin\nadmin\/*\nbatch\ntaxonomy\/term\/*\/edit\nuser\/*\/cancel\nuser\/*\/edit\nuser\/*\/edit\/*","non_admin":"admin\/structure\/block\/demo\/*\nadmin\/reports\/status\/php"},"ajaxCallback":"overlay-ajax"}},"merge":true},{"command":"insert","method":"replaceWith","selector":null,"data":"\u003cdiv class=\"messages error\"\u003e\n\u003ch2 class=\"element-invisible\"\u003eError message\u003c\/h2\u003e\nAn unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (900 MB) that this server supports.\u003c\/div\u003e\n","settings":null}]

Now I know for sure that I'm not uploading a picture that's bigger than the ridiculous limit of 900 MB I set in a php5.ini file I created before….

Google produced only a few similar sounding threads so i tried following a few fixes, like:

Changing a line in includes/file.inc as described here:
http://drupal.org/node/1002048#comment-4097842

Futzing with the tmp directory as suggested here:
http://drupal.org/node/939352

Per suggestion in some part of the above and other threads, tried adding the following lines to the php5.ini in the root directory:
safe_mode = off
open_basedir = none

I've checked permissions multiple times on all folders involved, and even changed them to 777 but it didn't matter.

I do know that the file will take the time to upload, but then it would produce an error at the end.

Because its happening on all my Drupal installs all at once, I can't help but think that its a GoDaddy thing - like some minor thing changed in the PHP that's causing this? Of course trying to talk to them produces no friendly results, as they "are not responsible for software" and refuse to offer any sort of guidance. "Its not a server issue because we can upload to the FTP fine here…." Well duh…

I am not a developer by any stretch of the imagination - more like a lego builder putzing around in my server, but if anyone might have some guidance as to how to tackle this problem, I'd appreciate it.

Sorry for the long post.

Brian

Comments

Bill Pair’s picture

I have the exact same problem, only on a local install using IIS and Windows 7. It might be a permissions issue (most likely) but no one seems quite clear when it comes to Windows. I know exactly what to do on a Unix system but not on Windows. Please provide assistance if you can.

tomlichaj’s picture

I had the same issue with Drupal 7 running on IIS 7. What I did to fix the issue was add the "IIS_WPG" user to the C:\Windows\Temp directory with Read/Write permissions. Once I did this the error was gone and I was able to upload any files like I normally would.

rdickert’s picture

I'm experiencing the exact same problem. Did you ever solve this? Does anyone have any ideas? Even a brand-new D7.7 installation will not upload any files. My experience is exactly like Brian's. Permissions shenanigans don't seem to help, and I'm not sure where to look for the code to comment out, if indeed that trick still works on D7. I would greatly appreciate anyone chiming in on this.

Robert

**************update - problem solved.
Godaddy was able to fix my problem. I had a web.config file in my drupal folder (no idea where it came from - I didn't put it there, and this is a Linux environment). I disabled it by renaming it. I also disabled php5.ini in my root directory. File uploads are back. It's a mystery to me, but if you are on godaddy and experience this problem, give it a go. Keep php.ini. They told me to put any special settings I want in that file, but I haven't tried it yet.

EmilyM’s picture

Thank you so much! This totally worked for me-- I'd spent like two hours trying to figure out my tmp folder. This fixed it right away!

Hummdis’s picture

The web.config file is included in Drupal. Download the latest version of Drupal from this very site and look in the zip/tar archive.

However, deleting the web.config file did not fix this problem for me. It did for the php5.ini...I suspect it's the upload path that's set, so I'll check on that and get back to you guys.

**********

Fixed using the following php5.ini variables:

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir = [Your Full Home Path]/html/temp/

; Maximum allowed size for uploaded files.
upload_max_filesize = 5M

Then, make sure that the 'temp' directory has 777 permissions for upload capabilities. Drupal moves the file into the proper location after upload, this is just a holding spot.

Hope this helps others.

stieglitz’s picture

I had this same problem but disabling the web.config file didn't do anything for me. The info from comment https://www.drupal.org/node/1157390#comment-5254864 adding the default temp folder to the php.ini file is what got me back in business again. Glad I found this thread! Thank you.

mumptastic’s picture

I have noticed on a client site that hosts with GoDaddy, that if you browse for the file you are looking for and then just click on save and not upload, it seems to work (most of the time). I am hoping to get the site moved off of GoDaddy in a few days.

RavindraSingh’s picture

i had the same problem when i was uploading 12MB of image in my custom content type.

then i had added the line php_value post_max_size 20M in my .htaccess file for getting out from this issue.

Tom Beigle’s picture

I encountered this problem on an internal server at work. I tried everything mentioned in this comment thread but to no avail. I reached out to our IT people and they were as stumped as I was. I decided to back-burner the issue a couple weeks ago and I just tested for the first time since then and voilà, file uploads were working perfectly. All that changed was that shortly after I decided to put off the resolution of this issue one of our IT people added some RAM to the aforementioned internal server for an entirely unrelated reason.

So when all else failed all we really needed was more RAM.

Obviously, this is highly specific and therefore will prove useless to most people – for that I offer my sincerest apologies. But, in the event that I forget what happened or someone else runs into the same issue, hopefully this little anecdote will prove helpful.