File upload hanging, any suggestions?

This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.


13 points

I can't upload 'large' (roughly 1MB) files to Drupal, has anyone
encountered this & know of a solution?

Firefox hangs, Opera 'uploads' a zero-byte file, Safari repeatedly
quits.

No problem uploading small graphics, e.g., for insertion with IMCE
into a posting.
This problem is in the file attachments section, I guess the core
Upload module.

Setup: Drupal 6.18, PHP 5.2.4, OSX (Apache/1.3).

* php.ini is set properly (I think):
file_uploads = On
upload_max_filesize = 15M
post_max_size = 30M
memory_limit = 128M
max_execution_time = 60
max_input_time = 120
[This is how it's been set for a while, the problem isn't that I
didn't restart Apache. Anyway if it takes more than minute,
something's wrong - and the server is about six feet away from me.]

* Drupal permissions are set - all users have corresponding quotas and
the permitted file types (the one in question is .rtfd, I added it).

Nothing informative in httpd error log or Drupal logs. Drupal seems to
think everything went fine.

I'm not using the Devel module, btw, which has been accused of causing
evil by its mere presence.
No firewall issue on the server.

I've heard of the 'hack' whereby you can upload the file by not
clicking attach, just submit, but when I tried it with Opera, it
seemed nothing happened; in fact the body of the post was submitted,
but not the attachment. With Firefox, the form just wasn't accepted
without clicking attach. Anyway my users need something easy (as do
I).

Thanks for any hints.

Eve



5 points

Have you checked your File Upload permissions, at admin/settings/uploads?
By default Drupal imposes a cap of 1MB on file uploads.

cheers,
-tao

Anonymous's picture
Created by Anonymous
-4 points

Yes thank you Tao, I have. You inspired me to double-check if
somehow the settings didn't take in the database:

mysql> select * from variable where name like "%upload%";

which produces exciting results such as:

| upload_extensions_3 | s:61:"jpg jpeg gif png txt doc xls pdf
ppt pps odt ods odp rtf rtfd"; |
| upload_uploadsize_3 | s:2:"15";
|
| upload_usersize_3 | s:2:"30";

This makes sense as I set max size per upload to 15MB and max total
'user size' (file quota) to 30MB

All (authenticated) roles have permission to upload, and everyone has a role.

I keep searching.
--Tao

Anonymous's picture
Created by Anonymous
1 point

Your server might also have file upload restrictions. drupal's
settings are not usually able to override your server's restrictions.
Check your status report or php error logs on the server to see if
this is the issue.

Good luck!
Jen

Anonymous's picture
Created by Anonymous

Post Comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.