Set limit for Maximum chars in post in ACP

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
Post Reply
User avatar
Kamahl19
Registered User
Posts: 161
Joined: Thu Dec 27, 2007 10:31 am

Set limit for Maximum chars in post in ACP

Post by Kamahl19 »

Hi,

I have been working on one forum, which had 2 really long posts with more then 2 000 000 characters. When I exported its DB and wanted to import, it stopped on first of those 2 posts and throwed an error: #2006 Server has gone away. I was not able to import it with any tool, not even bigdump. Therefore I suggest to find out what is the longest string which can be inserted to DB via phpMyAdmin and set the limit for Maximum chars in post in ACP. This should be done also for 3.0.13
Last edited by Kamahl19 on Sat Nov 09, 2013 7:07 pm, edited 2 times in total.

User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 137
Joined: Sun Dec 18, 2005 5:44 pm
Location: Texas
Contact:

Re: [RFC] Set limit for Maximum chars in post in ACP

Post by Noxwizard »

That is caused by your import script taking too long between queries. Your database connection timed out and you received "MySQL server has gone away [2006]" when the next query was attempted. If it had been caused by a value that exceeded the field's capacity, you would have received a different error. That's somewhat unlikely for the post_text field though, as we use mediumtext for that field, so it can take up to 16MB of text. Sending something of that size might cause you to receive an error about your query exceeding the max_packet_size, but that's still not the error you had. If you imported this with the MySQL commandline, you most likely would not have had an error.

User avatar
Kamahl19
Registered User
Posts: 161
Joined: Thu Dec 27, 2007 10:31 am

Re: [RFC] Set limit for Maximum chars in post in ACP

Post by Kamahl19 »

Well, most of the people use phpMyAdmin, adminer.org or BigDump. MySQL cmd is used mainly by "server guys" :) So could not we just limit the size (to the max size of field's capacity) and prevent this from happening? Such a long posts are not common, and poster can split the text to more posts.

Post Reply