Current time: 02-07-2012, 04:58 AM Hello There, Guest! (LoginRegister)


MyBB's filesize function
06-30-2009, 08:46 AM
Post: #1
Solved: 1 Year, 4 Months, 1 Week, 1 Day, 14 Hours, 53 Minutes, 46 Seconds ago MyBB's filesize function
Greetings,

Is 2 GB the max file size allowed by MyBB's filesize function?

The developer said

I think the 2gb error is coming because myBB's filesize function cannot handle large sizes.
Find all posts by this user
06-30-2009, 10:24 PM
Post: #2
Solved: 1 Year, 4 Months, 1 Week, 1 Day, 14 Hours, 53 Minutes, 46 Seconds ago RE: MyBB's filesize function
Not only that but its based on the max filesize of your host.

NOTE: I have officially returned and will be going to back to working on my mods as well offering paid services.

Follow me on twitter: @projectlevel9
Visit this user's website Find all posts by this user
07-01-2009, 04:10 AM
Post: #3
Solved: 1 Year, 4 Months, 1 Week, 1 Day, 14 Hours, 53 Minutes, 46 Seconds ago RE: MyBB's filesize function
This user has been denied support. This user has been denied support.
2GB? That can choke at so many points. Your ISP, the host, the php script. Realistically a 2GB file is immense and you may need to make serious adjustments somewhere for them to work.

Do you get any error messages? What exactly happens?

New MyBB plugin is "IPLH (IP Log History) v1.0".
[Image: 468x60_SF.gif]
Vote for MyBB to add a Security section.
Visit this user's website Find all posts by this user
07-01-2009, 07:38 AM (This post was last modified: 07-01-2009 07:41 AM by Tomm M.)
Post: #4
Solved: 1 Year, 4 Months, 1 Week, 1 Day, 14 Hours, 53 Minutes, 46 Seconds ago RE: MyBB's filesize function
"MyBB's filesize function". Forgive me for ignorance, but I thought MyBB used filesize(), which is actually PHP. The only thing MyBB has is a get_friendy_size function that formats the number correctly.

Quote:Because PHP's integer type is signed and many platforms use 32bit integers, filesize() may return unexpected results for files which are larger than 2GB. For files between 2GB and 4GB in size this can usually be overcome by using sprintf("%u", filesize($file)).

Source: PHP: Filesize Function

You'll need to edit the areas of MyBB where filesize() is used with the one PHP recommends. Unless of course, I'm wrong.

[Image: igG319dTu71gT.png]
Find all posts by this user


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication