Menu

#2973 Uncaught PDOException ... Illegal mix of collations

v4.3.1
closed-works-for-me
None
5
2022-07-03
2022-06-24
David Smart
No

In the Families report, I can click some letters and everything works as expected. For some other letters, I get a crash report.


Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'like' in /volume1/web/gen/includes/classes/class_pgv_db.php:852 Stack trace: #0 /volume1/web/gen/includes/classes/class_pgv_db.php(852): PDOStatement->execute() #1 /volume1/web/gen/includes/classes/class_pgv_db.php(867): PGV_DBStatement->__call('execute', Array) #2 /volume1/web/gen/includes/functions/functions_db.php(420): PGV_DBStatement->__call('fetchAll', Array) #3 /volume1/web/gen/famlist.php(208): get_famlist_surns('', 'S', true, '6') #4 {main} thrown in /volume1/web/gen/includes/classes/class_pgv_db.php on line 852

1 Attachments

Discussion

  • David Smart

    David Smart - 2022-06-24

    PhpGedView v4.3.1 rev 7350, PHP 7.4.9

     
  • Gerry Kroll

    Gerry Kroll - 2022-06-24

    This appears to be a problem with one of the columns in your database. I can't reproduce this on my system, where all column definitions are consistent.

    You can try exporting your database to a GEDCOM, and then importing that just-exported GEDCOM, letting PhpGedView erase all existing database contents during the Import. BE SURE TO DO A DATABASE BACKUP BEFORE YOU START.

     
  • Gerry Kroll

    Gerry Kroll - 2022-07-03
    • status: open --> closed-works-for-me
    • assigned_to: Gerry Kroll
     
  • Gerry Kroll

    Gerry Kroll - 2022-07-03

    The OP sent me a copy of his GEDCOM, which I was able to import into my "test" system, still running PHP 5.3 as well as into my "working" system, running PHP 7.4.

    No problems were encountered, and the error could not be reproduced.

    I suspect that the problem is a corrupt database or a corrupt index. In either case, an export-and-import should correct the problem because this action will blow away a possibly corrupt database table and then recreate the required tables and indexes.

     

Log in to post a comment.