[wp-trac] [WordPress Trac] #54836: Huge error logs filled with "WordPress database error Illegal mix of collations" errors caused by spammers

WordPress Trac noreply at wordpress.org
Wed Apr 26 21:12:29 UTC 2023


#54836: Huge error logs filled with "WordPress database error Illegal mix of
collations" errors caused by spammers
--------------------------+------------------------------
 Reporter:  jh20001       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Database      |     Version:
 Severity:  critical      |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by pbiron):

 Replyinhttps://core.trac.wordpress.org/ticket/54836?replyto=1#g to
 [comment:1 audrasjb]:
 > Based on the error logs you shared, it looks like you have different
 types of collations in your database. I think it is not something you
 should have on a default and recent WordPress install.

 To me it the messages in the log don't suggest a mix of collations in the
 DB, but rather a different in the collation in the DB and the encoding of
 the text in the query.

 I think a way to test that hypothesis is to use PHP's
 [https://www.php.net/manual/en/function.mb-convert-encoding
 mb_convert_encoding()] to "force" the encoding of a simple WP_Query string
 to use a different collation than the DB does.  I suspect the error
 message in that case will be the same as what's in the sample log file.

 If that is the case, I don't know that core can/should do anything about
 this.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54836#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list