Advertisement:

Author Topic: How to remove 65K character limit on messages  (Read 2867 times)

Offline DeveloperMcD

  • Semi-Newbie
  • *
  • Posts: 14
How to remove 65K character limit on messages
« 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?

Offline Biology Forums

  • SMF Hero
  • ******
  • Posts: 3,779
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: How to remove 65K character limit on messages
« Reply #1 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.

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,665
  • We were all equal in the end.
Re: How to remove 65K character limit on messages
« Reply #2 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.
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns

Offline Biology Forums

  • SMF Hero
  • ******
  • Posts: 3,779
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: How to remove 65K character limit on messages
« Reply #3 on: March 21, 2019, 12:53:34 AM »
That doesn't work, unfortunately. It needs to be done manually

Online Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Project Manager
  • SMF Super Hero
  • *
  • Posts: 19,331
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Re: How to remove 65K character limit on messages
« Reply #4 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.
A Finnish Project Manager (Support Specialist)
Happily running multiple SMF 2.0 installations.
 Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: How to remove 65K character limit on messages
« Reply #5 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.
No good deed goes unpunished
All helpful urges should be circumvented

Offline Biology Forums

  • SMF Hero
  • ******
  • Posts: 3,779
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: How to remove 65K character limit on messages
« Reply #6 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

Offline Samuel28

  • Newbie
  • *
  • Posts: 1
Re: How to remove 65K character limit on messages
« Reply #7 on: November 03, 2020, 03:44:01 AM »
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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: How to remove 65K character limit on messages
« Reply #8 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.
No good deed goes unpunished
All helpful urges should be circumvented

Online Irisado

  • Una Luz Brillante en la Oscuridad
  • Doc Coordinator
  • SMF Super Hero
  • *
  • Posts: 10,764
  • Soñando debajo del arco iris
Re: How to remove 65K character limit on messages
« Reply #9 on: November 03, 2020, 01:52:58 PM »
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.
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente