Advertisement:

Author Topic: Subs-Post.php error  (Read 547 times)

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,039
  • 'Tis the gift to be simple (duh)
Subs-Post.php error
« 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 -

Code: [Select]

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


Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 20,274
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Subs-Post.php error
« Reply #1 on: May 23, 2018, 10:37:46 PM »
Is the forum on utf8?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,039
  • 'Tis the gift to be simple (duh)
Re: Subs-Post.php error
« Reply #2 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.

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 20,274
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Subs-Post.php error
« Reply #3 on: May 24, 2018, 06:50:20 PM »
Yeah always make sure the collation matches for all tables
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,039
  • 'Tis the gift to be simple (duh)
Re: Subs-Post.php error
« Reply #4 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.

Online shawnb61

  • Support Specialist
  • Sr. Member
  • *
  • Posts: 868
    • sbulen on GitHub
Re: Subs-Post.php error
« Reply #5 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,
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Chen Zhen

  • Sophist Member
  • *****
  • Posts: 1,124
  • Gender: Male
  • If you're going through hell, keep going!
    • Underdog-01 on GitHub
    • WebDev.ca
Re: Subs-Post.php error
« Reply #6 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

Online shawnb61

  • Support Specialist
  • Sr. Member
  • *
  • Posts: 868
    • sbulen on GitHub
Re: Subs-Post.php error
« Reply #7 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.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Chen Zhen

  • Sophist Member
  • *****
  • Posts: 1,124
  • Gender: Male
  • If you're going through hell, keep going!
    • Underdog-01 on GitHub
    • WebDev.ca
Re: Subs-Post.php error
« Reply #8 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
« Last Edit: May 25, 2018, 12:49:37 AM by Chen Zhen »

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,039
  • 'Tis the gift to be simple (duh)
Re: Subs-Post.php error
« Reply #9 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.

Offline Chen Zhen

  • Sophist Member
  • *****
  • Posts: 1,124
  • Gender: Male
  • If you're going through hell, keep going!
    • Underdog-01 on GitHub
    • WebDev.ca
Re: Subs-Post.php error
« Reply #10 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.


Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,039
  • 'Tis the gift to be simple (duh)
Re: Subs-Post.php error
« Reply #11 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.