General Error post_text php5

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
vanlaywan
Registered User
Posts: 14
Joined: Thu May 06, 2004 11:14 pm

General Error post_text php5

Post by vanlaywan »

I have, today, upgraded to php5.....

the system appears to have set the collation in the database to latin1_swedish_ci and an error message is now appearing on some posts...
General Error
SQL ERROR [ mysql4 ]

Data too long for column 'post_text' at row 1 [1406]

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
I beleive this is something to do with the collation setting in the database....

I tried changing the collation to rtf8_unicode_ci but get an error message
Error
SQL query:

ALTER TABLE `phpbb3_posts` CHANGE `post_text` `post_text` MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL

MySQL said:

#1283 - Column 'post_text' cannot be part of FULLTEXT index

Any ideas please on how to rectify the board errors or the mysql error.

Thanks

Van
vanlaywan
Registered User
Posts: 14
Joined: Thu May 06, 2004 11:14 pm

Re: General Error post_text php5

Post by vanlaywan »

Have managed to fix this....

Here's the code to fix in phpmyadmin for anyone else that comes across it:

Code: Select all

ALTER TABLE table_name CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci
where table_name = your table to be modified.

Php5 sets the tables as Latin1_swedish_ci this causes the above error message for large posts. Setting the fields to utf8_unicode_ci rectifies this issue.

Regards

Van
User avatar
wilkc
Registered User
Posts: 251
Joined: Wed Mar 27, 2002 2:43 am
Location: Tampa, FL
Contact:

Re: General Error post_text php5

Post by wilkc »

Van,

I'm getting this same error, too, when I try to leave a post. However, I'm not sure what you did to fix the problem. Can you ~ or anyone else up tonight ~ walk me through the process?

Thx,
wilkc
NWTAMPA.COM
Serving NW Tampa
Kilmarac
Registered User
Posts: 3
Joined: Fri Jul 25, 2003 1:40 pm

Re: General Error post_text php5

Post by Kilmarac »

I dont think the alter table thing above fixes it.

I tried that, it didnt fix it here, what did fix it though was that I changed the table type to LongBlob After that, my post went through.
Locked

Return to “[3.0.x] Support Forum”