MyBB Community Forums

Full Version: myBB limits?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

I just installed myBB yesterday. First impression is very good. Smile

However during my tests I noticed one problem. I wanted to find out what would happen if someone posted quite a lot of text in a single posting. So what I did is I took a string 0123456789 or abcdefghijklmnopqrstuvwxyz and copy & pasted it several times until I had a really long word (60000 characters... yeah I know I overdid it a little as I copy&pasted the copy for exponential growth Dodgy).

Anyway it seems that myBB simply cuts off a posting after a specific threshold (65535 characters?). You can edit more, write longer texts in the editor, you can submit it and it will even tell you that it was successful and everything, but when you go back to the forum you end up with only half a posting and everything else is lost.

Can I set the max posting size limit in myBB somewhere and shouldn't myBB tell the user that the posting is simply too damn long?

What I actually wanted to find out by this is wether too long words would bust the myBB layout, which it doesn't, as myBB seems to forcibly insert spaces into those words. Which is a good thing imo.
Who's going to make a post 60 thousand characters long?? Toungue

ACP > Configuration > Posting > Maximum Message Length > make sure it's 0.
(2008-11-08, 03:34 PM)Matt_ Wrote: [ -> ]Who's going to make a post 60 thousand characters long??

ACP > Configuration > Posting > Maximum Message Length > make sure it's 0.

The maximum message length is 0.

So... maybe the myBB isn't at fault but instead the web server does not accept longer posts? Huh

On the other hand, I set maximum message length to 1000 just for testing, and I can still make longer postings with no problem. Huh (Maybe because I have admin permissions?)

EDIT:
Ah, normal users do get a warning about too long messages and can't post if they exceed the limit. Admins seem to have no limit but the posting gets cut off after 65k characters anyway for some reason. That's fine for me, thank you for your reply.
Ah, I think it's a MySQL limitation - I did a bit of searching and I found this, seems to explain it.
That would indeed explain it. Thank you. I'll just set the limit to 50k - no user should ever hit that limit but if he does he gets a proper error message instead of half a posting missing.

EDIT: I'll open a new thread for my next problem, sorry for the inconvenience. Angel
Quote:CHAR( ) A fixed section from 0 to 255 characters long.
VARCHAR( ) A variable section from 0 to 255 characters long.
TINYTEXT A string with a maximum length of 255 characters.
TEXT A string with a maximum length of 65535 characters.
BLOB A string with a maximum length of 65535 characters.
MEDIUMTEXT A string with a maximum length of 16777215 characters.
MEDIUMBLOB A string with a maximum length of 16777215 characters.
LONGTEXT A string with a maximum length of 4294967295 characters.
LONGBLOB A string with a maximum length of 4294967295 characters.

The message field is currently a database column "TEXT" field.

http://dev.mysql.com/doc/refman/5.0/en/s...ments.html

You can change the column to MEDIUMTEXT or LONGTEXT if you want a higher limit
(2008-11-08, 03:44 PM)Matt_ Wrote: [ -> ]Ah, I think it's a MySQL limitation - I did a bit of searching and I found this, seems to explain it.

You're half right. It is a MySQL limitation, but it's not a bug. It's because the message column in the mybb_posts table is of "TEXT" type which can only take 65k characters or so. You can easily change that to MEDIUMTEXT or LONGTEXT which can hold 16 million and 4 trillion characters respectively. You can edit this column in phpMyAdmin and change the column type to MEDIUMTEXT or LONGTEXT.
Thanks! Smile
(2008-11-10, 07:58 AM)DennisTT Wrote: [ -> ]
(2008-11-08, 03:44 PM)Matt_ Wrote: [ -> ]Ah, I think it's a MySQL limitation - I did a bit of searching and I found this, seems to explain it.

You're half right. It is a MySQL limitation, but it's not a bug. It's because the message column in the mybb_posts table is of "TEXT" type which can only take 65k characters or so. You can easily change that to MEDIUMTEXT or LONGTEXT which can hold 16 million and 4 trillion characters respectively. You can edit this column in phpMyAdmin and change the column type to MEDIUMTEXT or LONGTEXT.

Ahh I see... wow, 4 trillion characters :o Toungue
This was the vain of my life one-time over in a php game I made...

As a suggestion, only change the default to MEDIUMTEXT. Just think about all those search queries if you had a few trillion charactered posts...
Pages: 1 2