Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: DeveloperMcD on March 20, 2019, 10:30:44 PM

Title: How to remove 65K character limit on messages
Post by: DeveloperMcD on March 20, 2019, 10:30:44 PM
I notice that messages (posts) are limited to a 16-bit value, or 65,535 characters.

However, I noticed that the database has the post "body" set to LARGETEXT which should be able to store 2.4 GB or something like that.

How can I remove this artificial limitation on post size?
Title: Re: How to remove 65K character limit on messages
Post by: Study Force on March 20, 2019, 10:56:19 PM
Change the body to medium text, also you'll need to change the limit on the function for createpost.
Title: Re: How to remove 65K character limit on messages
Post by: Sir Osis of Liver on March 20, 2019, 11:05:02 PM
Don't have a 1.1 install, but in 2.0 you can try Admin -> Posts and Topics -> Post Settings.  Set 'Maximum allowed post size' to 0 for no limit.
Title: Re: How to remove 65K character limit on messages
Post by: Study Force on March 21, 2019, 12:53:34 AM
That doesn't work, unfortunately. It needs to be done manually
Title: Re: How to remove 65K character limit on messages
Post by: Aleksi "Lex" Kilpinen on March 21, 2019, 01:22:09 AM
Change the body to medium text
This is definitely good advice.

also you'll need to change the limit on the function for createpost.
This I don't think is needed.

It needs to be done manually
And, I do believe not.

Just set the post limit size in the admin panel to something larger than 65K, but NOT 0.

Do take note that any limit you decide to set here, you will also have to make sure many other settings can cope with. Such as PHP limits and mysql limits.
Title: Re: How to remove 65K character limit on messages
Post by: Arantor on March 21, 2019, 03:36:34 AM
Wait.

This isn’t that simple, changing it can break things.

If you are on 2.0, just change the size of allowed post characters to something bigger than 65536 and it’ll convert, provided that you aren’t using full text search, because full text indexes with mediumtext aren’t supported.

Don’t bother with largetext, that just eats space and you can’t post a post big enough to fill even a mediumtext without reconfiguring MySQL anyway.

If you are on 1.1, upgrade to 2.0.
Title: Re: How to remove 65K character limit on messages
Post by: Study Force on March 21, 2019, 07:45:36 AM
I take back what I said about manually changing the code on 2.x. On 1.x however I remember precisely that it only worked after the medium text switch and manually altering the code