Previous Thread
Next Thread
Print Thread
Hop To
Joined: Oct 2007
Posts: 361
Likes: 8
Enthusiast
Enthusiast
Joined: Oct 2007
Posts: 361
Likes: 8
I was asked to rebuild the content on our forum. I started with Posts, and got this error about 275,000 posts into a 1 million plus set.
Quote
Script: /var/www/html/ubbthreads/libs/content_rebuild.inc.php
Line: 89
SQL Error: Data too long for column 'POST_BODY' at row 1
SQL Error: 1406
I'm not sure what to do with this. Can I rebuild the Forums, Topics, etc? Or do I need to stop and fix this first? If the latter, how do I do that?


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 7.7.5
Release 20201027
Server OS Linux
Server Load 0.16
Web Server Apache/2.4.6
PHP Version 7.4.33
MYSQL Version 5.7.43
Database Size 1.85 GB
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
When a user overflows a TEXT cell size with a single post that's 64 Kilobytes of text in in the single database cell; a MEDIUMTEXT (the default size of a PHP text string) is the next size up as far as database text types go, and is really untested with the UBB.threads system (I'd make a copy of your database and convert the cell and check if everything is running without an issue before you proceed). The MEDIUMTEXT allows 16 Megabytes of text into a single cell, and users really should not be inserting that much text into a single posting..


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Oct 2007
Posts: 361
Likes: 8
Enthusiast
Enthusiast
Joined: Oct 2007
Posts: 361
Likes: 8
Thank you for your response.

Is it safe to rebuild Topics, Forums, and Post Counts before addressing this issue? And is there any way to determine which post or posts is/are the culprit?


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 7.7.5
Release 20201027
Server OS Linux
Server Load 0.16
Web Server Apache/2.4.6
PHP Version 7.4.33
MYSQL Version 5.7.43
Database Size 1.85 GB
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
I believe that the error should throw the row id when managing that table via phpmyadmin or the cli (I have only seen it when attempting to convert the database to a utf8mb4_general_ci collation


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Oct 2007
Posts: 361
Likes: 8
Enthusiast
Enthusiast
Joined: Oct 2007
Posts: 361
Likes: 8
Thank you.


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 7.7.5
Release 20201027
Server OS Linux
Server Load 0.16
Web Server Apache/2.4.6
PHP Version 7.4.33
MYSQL Version 5.7.43
Database Size 1.85 GB
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
Bear in mind that if you can find the row id it simply could be a corrupted post.
That may need editing or just deleting.

Of course that means database diving like using phpadmin and editing that row in that table.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Oct 2007
Posts: 361
Likes: 8
Enthusiast
Enthusiast
Joined: Oct 2007
Posts: 361
Likes: 8
I don't have a problem doing that if I can identify the row.


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 7.7.5
Release 20201027
Server OS Linux
Server Load 0.16
Web Server Apache/2.4.6
PHP Version 7.4.33
MYSQL Version 5.7.43
Database Size 1.85 GB
Joined: Oct 2007
Posts: 361
Likes: 8
Enthusiast
Enthusiast
Joined: Oct 2007
Posts: 361
Likes: 8
I found the problem post and deleted it. After that I was able to successfully rebuild posts.

I ran into a second problem when rebuilding private messages. This is the error message. It was consistently repeatable.

Code
Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/ubbthreads/libs/html.inc.php on line 858

Anyone have an idea what might be causing this?


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 7.7.5
Release 20201027
Server OS Linux
Server Load 0.16
Web Server Apache/2.4.6
PHP Version 7.4.33
MYSQL Version 5.7.43
Database Size 1.85 GB
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
The maximum execution time is a setting in your PHP configuration, ask your host to increase this value to 60 to process your data; I'm assuming that because you have such a large forum that it's simply taking longer to process all of the data.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Oct 2007
Posts: 361
Likes: 8
Enthusiast
Enthusiast
Joined: Oct 2007
Posts: 361
Likes: 8
Thanks. I suspected that's what it was. We'll try again tonight.


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 7.7.5
Release 20201027
Server OS Linux
Server Load 0.16
Web Server Apache/2.4.6
PHP Version 7.4.33
MYSQL Version 5.7.43
Database Size 1.85 GB
Joined: Jun 2008
Posts: 48
Likes: 1
A
Newbie
Newbie
A Offline
Joined: Jun 2008
Posts: 48
Likes: 1
Hi Gizmo (or others)

Running the tool to convert our forum database from latin1_swedish_ci to utf8mb4_general_ci

I get the following error

Script:
Line:
SQL Error: Data too long for column 'POST_BODY' at row 159149
SQL Error: 1406

Query:ALTER TABLE ubbt_POSTS MODIFY `POST_POSTER_IP` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
MODIFY `POST_SUBJECT` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
MODIFY `POST_BODY` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
MODIFY `POST_DEFAULT_BODY` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
MODIFY `POST_ICON` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
MODIFY `POST_MARKUP_TYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'markup',
MODIFY `POST_LAST_EDITED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
MODIFY `POST_LAST_EDIT_REASON` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
MODIFY `POST_POSTER_NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
MODIFY `POST_MD5` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

So my question is if row 159149 is the value in POST_ID or is it the physical row in the table not ordered by an index?

If it is not the POST_ID is there a simple way to select that row so I can try to edit out the cause of the "Data too long" error?

The text length is 4540 (Not the largest of our POST_BODY entries and begins with "<div class="ubbcode-block"><div class="ubbcode-header"> " where there are many other records smaller and larger before this POST_ID .

Although the query result records are mostly in POST_ID order they are not exactly in order leading me to believe the error row reported by the script is not the POST_ID

Any ideas how best to get row record reported by the script?

Abbott

Joined: Jun 2008
Posts: 48
Likes: 1
A
Newbie
Newbie
A Offline
Joined: Jun 2008
Posts: 48
Likes: 1
Found the offending record. Truncated POST_BODY and POST_DEFAULT_BODY to the same spot in the text. Re-running conversion script.

Abbott

Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
Late on the answer but yes, that is the row number not a post id number.
Phpmyadmin in cpanel is probably the most popular tool to use to edit the row.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
0 members (), 868 guests, and 221 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)