Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Sir Osis of Liver on May 23, 2018, 10:16:46 PM

Title: Subs-Post.php error
Post by: Sir Osis of Liver on May 23, 2018, 10:16:46 PM
Believe this has been reported elsewhere, did a clean 2.0.15 install for old forum, was running without errors, today he starts getting these when trying to post or pm -



http://www.domain.net/forum/index.php?action=pm;sa=send2
Database Error: Incorrect string value: '\x92m ask...' for column 'body' at row 1
File: /home/illinina/public_html/forum/Sources/Subs-Post.php
Line: 1141


Title: Re: Subs-Post.php error
Post by: vbgamer45 on May 23, 2018, 10:37:46 PM
Is the forum on utf8?
Title: Re: Subs-Post.php error
Post by: Sir Osis of Liver on May 24, 2018, 06:04:17 PM
Most of the db tables are latin1_swedish_ci, some are utf8_general_ci, and I have '$db_character_set = 'utf8';' in Settings.php.  Apparently the db was converted at some point, but someone restored tables from a backup, or something else to mess it up.  There've been several people working on this forum before they came back to me, no way to know what was done.  I'll use pma to convert everything to utf-8, see what happens.
Title: Re: Subs-Post.php error
Post by: vbgamer45 on May 24, 2018, 06:50:20 PM
Yeah always make sure the collation matches for all tables
Title: Re: Subs-Post.php error
Post by: Sir Osis of Liver on May 24, 2018, 06:55:09 PM
PMA just changed overall collation, tables remained the same.  Admin utf-8 conversion would not run until I removed fulltext search index, now all tabes are utf-8 but it won't let me create another fulltext index.  Trying to create a large custom index, but it keeps crapping out and has to be manually resumed.  Dropped backup tables, but it's still a large db.
Title: Re: Subs-Post.php error
Post by: shawnb61 on May 24, 2018, 10:13:07 PM
SOoL:

This utility may help you figure out if everything is UTF8 as expected:
   https://github.com/sbulen/sjrbTools/blob/master/SMF_UTF8_Diag.php

I'm assuming your index restart issues are due to a time limit being exceeded?  What is the exact message?

If the issue is time limit related, you may want to check out the function CreateMessageIndex() in ManageSearch.php.  There are 2 parameters in there that may be worth experimenting with:
- $messages_per_batch  (try reduction)
- @set_time_limit (try increasing)

The fact that you are exceeding the time limit may mean that the set_time_limit is failing (maybe prohibited on your host).  If so, you may need to reduce your $messages_per_batch a lot. 

Hope this helps,
Title: Re: Subs-Post.php error
Post by: Chen Zhen on May 25, 2018, 12:03:14 AM
For large forums it is better to split the db transfer by three.
Do one transfer of just the messages table, then do 1 transfer of just the members table & then do all the other tables (minus the two you already did).
The messages table can still give problems on its own if it is really large.

You also likely need to increase some limits within your php.ini file.
upload_max_filesize = 128M
post_max_size = 64M
max_execution_time = 300




This info may also be of interest regarding your database changes: https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html
Title: Re: Subs-Post.php error
Post by: shawnb61 on May 25, 2018, 12:12:37 AM
This isn't a transfer - he's trying to rebuild the index and it's pooping out.
Title: Re: Subs-Post.php error
Post by: Chen Zhen on May 25, 2018, 12:18:08 AM
Ok I suppose I missed that because it's mentioned in the middle of talk about database issues.

Quote
Trying to create a large custom index, but it keeps crapping out and has to be manually resumed.

In that case download the file via your FTP platform, edit and save it in a proper editor locally & then upload the file anew using the FTP platform.
My preferred FTP platform: http://www.wftpserver.com/download/ftprush.exe
Title: Re: Subs-Post.php error
Post by: Sir Osis of Liver on May 25, 2018, 12:04:49 PM
It's giving me this in Admin -> Search Method -

Index: cannot be created because the max message length is above 65,535 or table type is not MyISAM

Was able to create large custom index, took almost two hours due to server timeouts.  All tables are utf-8, no errors since last night.  Will see what happens.
Title: Re: Subs-Post.php error
Post by: Chen Zhen on May 25, 2018, 02:37:20 PM

If you do a search on SMF that has been brought up before.
I'm not sure if it's relevant to your problem:
https://www.simplemachines.org/community/index.php?topic=50893.0

.. well test things out & hopefully nothing it corrupted after whatever changes you applied.

Title: Re: Subs-Post.php error
Post by: Sir Osis of Liver on May 25, 2018, 10:37:32 PM
Error log is clean since last night, will let it run with custom index until something bad happens.
Title: Re: Subs-Post.php error
Post by: mousetemple on October 30, 2018, 02:14:41 PM
I seem to be having a similar error.
All the tables in my database are utf8-general-ci, but the database itself says it is latin-swedish-ci.   The database engine interface claims to be utf8-general-ci.   Things were working fine, and suddenly can't post to certain topics with a variety of collation related errors.      Any advice would really help  Thanks

SMF 2.0.15
Title: Re: Subs-Post.php error
Post by: Sir Osis of Liver on October 30, 2018, 03:59:40 PM
You should start a new topic.  Which problem are you having?