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: Biology Forums 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: Biology Forums 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
Quote from: Study Force on March 20, 2019, 10:56:19 PM
Change the body to medium text
This is definitely good advice.

Quote from: Study Force on March 20, 2019, 10:56:19 PM
also you'll need to change the limit on the function for createpost.
This I don't think is needed.

Quote from: Study Force on March 21, 2019, 12:53:34 AM
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: Biology Forums 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
Title: Re: How to remove 65K character limit on messages
Post by: Samuel28 on November 03, 2020, 03:44:01 AM
Quote from: DeveloperMcD on March 20, 2019, 10:30:44 PM
I notice that messages (posts) are limited to a 16-bit value of 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?

I also have this same question and I cannot find any proper answers. need a solution.
Title: Re: How to remove 65K character limit on messages
Post by: Arantor on November 03, 2020, 04:14:33 AM
Step 1: upgrade to SMF 2.0, Step 2: change the limit in the settings to a number larger than 65536, Step 3: watch as SMF will fix it for you.
Title: Re: How to remove 65K character limit on messages
Post by: Irisado on November 03, 2020, 01:52:58 PM
Quote from: Samuel28 on November 03, 2020, 03:44:01 AM
I also have this same question and I cannot find any proper answers. need a solution.

Please do not revive such old topics in the future and start a new one instead.  Topic locked.