File-size check error

coplan - July 12, 2006 - 21:37
Project:Disk Node
Version:4.7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:mooffie
Status:active
Description

I have been working with one of my users to pinpoint what appears to be a file-size check error. Initially, I set the file-size requirement (in the settings panel) to '0' which should therefore not limit the size of the file. If he tries to upload a larger file (we tried at 12MB file) it gives an error: "Uploaded file exceeded the maximum size of 0 MB".

So I tried setting the filesize limit to 40MB (40000000), and got a similar error. When uploading a 4MB file, we got the following error: "Uploaded file exceeded the maximum size of 38.15 MB"

Tweak #3 - we tried setting the file size limit to 4 gig (4000000000) and tried uploading the same 4MB file. We got this error: "Uploaded file exceeded the maximum size of 2048 MB"

I see three potential problems:
1) It's not checking the file size properly.
2) The error reported isn't accurate...it seems to be off by one decimal space.
3) There may be some other entirely unrelated error, and it's reporting the error incorrectly.

Background info:
I'm using Drupal 4.7.2 with the latest version (downloaded last night) of Disk Node.

If you need any other info...let me know.

#1

coplan - July 13, 2006 - 12:54

More troubleshooting that we came up with. There is a max-upload file size limit in the PHP settings. We increased that, and it seemed to help a little bit. However, it still seems like anything over 4MB takes a really long time and then just dies. Not a server problem, we've uploaded successfully through other php cms's.

I did, however, start getting new errors:

This one I got when I tried to get info about a given file in the file browser.

warning: mime_magic: invalid type 0 in mconvert(). in /var/www/sites/antisoc.net/site/fulcrum/modules/disknode/disknode.inc on line 411.

This one appears when I actually create the disknode and when I view it as a normal user:

warning: mime_magic: invalid type 0 in mconvert(). in /var/www/sites/antisoc.net/site/fulcrum/modules/disknode/disknode.inc on line 280.

I should note that I get the error even if I upload a smaller file. I can even download that file and the system behaves normally otherwise. But the errors pop up.

#2

coplan - July 21, 2006 - 17:09

Still havn't been able to figure it out. Anyone have any thoughts?

#3

mooffie - November 6, 2007 - 05:46
Title:File check errors» File-size check error
Priority:critical» normal
Assigned to:Anonymous» mooffie

There is a max-upload file size limit in the PHP settings. We increased that, and it seemed to help a little bit.

That's not enough. You need to raise the max POST size limit as well. see:

http://php.net/manual/en/ini.core.php#ini.post-max-size

"Uploaded file exceeded the maximum size of 0 MB"

Yes, disknode should print PHP's limit, not its own limit. It should be easy to fix.

 
 

Drupal is a registered trademark of Dries Buytaert.