I have a live site and a dev site both running off a Mediatemple server. The site does varioius things and has a relatively large amount of modules / functionality, but the Upload module is currently being used only my administrators (ie. me). I use it to upload Videos (using Flashvideo module) and to upload image Ads (using Ad module) primarily.

At some point last week (unfortunately I made many changes in this time) the upload module simply stopped working. I am not receiving any error messages, the upload status bar appears, but stops at some point without ever actually attaching any files. I can't get it to upload any size file at all.

- Nothing is appearing in the logs
- I have checked and triple checked the php.ini upload settings (set high to 40M for Post and Upload limits) and nothing has changed in this
- I am able to upload using other upload functionality (for instance, I can upload images of any size via the image module and such)
- I have rebooted the server
- I have truncated the cache table
- I have attempted to attach files via both flashvideo and ad and just attaching files to posts and nothing seems to take

I was uploading a video via Flashvideo when I discovered this (thus it may or may not be the cause)

- I have disabled this module and attempted to upload (still didn't work)

I'm pretty stumped. Any help would be greatly appreciated.

Thanks,
nathan.

Comments

Christefano-oldaccount’s picture

Thanks for the helpful details. Try attaching an upload without clicking the Attach button (just click the Browse button). If the file is uploaded successfully when you submit the form, then your problem is related to http://drupal.org/node/65153

cog.rusty’s picture

A couple things to check:

The "files" and "tmp" directory settings in /admin/settings/file-system. Do these directories exist and are they writable by apache? (777). By default tmp = "/tmp", located under the server's root. Try to make it "files/tmp" so that you can watch it easier.

Also make sure that PHP's magic_quotes_gpc is disabled. This has been a cause of silent upload failures. If you have Drupal's .htaccess file it should have taken care of that.

nathanmoomaw’s picture

Thanks for getting back to me.

I had checked all the directory permissions and I just rechecked, it all seems fine. Also magic_quotes_gpc is off.

I am, however, able to submit without hitting 'attach' and the files do get attached that way. So I guess it's a problem with the ajax attach in the upload module. I attempted to do the fixes on issue the link mentioned. I made sure that the favicon default checkbox was checked for global and current theme. I also patched my phptemplate file, but neither of these things fixed the problem with the ajax upload.

Thanks again for all the help. If anyone has any more suggestions please let me know.

nathan.

dgtlmoon’s picture

resolved i think, basically the php setup MT has funny issues when you write to /tmp/ (ie: when you do a file upload it looses it), what should happen is when you upload the file lands in /tmp/sdfasd.tmp then it gets copied to the 'real' destination.

so in .htaccess i added

php_value upload_tmp_dir tmp

and created this "tmp" and chmod 777 under the top drupal tree, so it uses the drupal/tmp instead of system /tmp/

providing the perms of that dir are kept, all should be well

dgtlmoon drupal devel and hosting

andrewfn’s picture

I am having exactly the same problem at Media Temple. However *sometimes* files upload successfully.
The same file will sometimes upload and sometimes not. It does seems to depend on how busy the server is, which makes me think it is related to AJAX asynchronous timing issues.
For now I have disabled the [Attach] button, but I will experiment with the .htaccess idea from dgtlmoon.

RareImagery-1’s picture

This is a problem on there DV server, by un-checking safe mode in the php server it will allow you to upload

gwaine’s picture

For those stumbling onto this thread looking for answers...for me everything worked again after disabling the "Theme Developer" module. I keep forgetting to turn it off when I'm not using it and it tends to give unexpected results in many parts of the site when left on. Hope this saves someone some frustration.