We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1921
    • 32 Posts
    Immediately following the test for database connection and clicking next, I get this problem when I try to upgrade from rc2 to rc3:

    Warning: PDO::exec() [pdo.exec]: SQLSTATE[42000]: Syntax error or access violation: 1253 COLLATION ’latin1_swedish_ci’ is not valid for CHARACTER SET ’utf8’ in /home/tvshowmu/public_html/core/xpdo/om/mysql/connect.inc.php on line 12

    Warning: Cannot modify header information - headers already sent by (output started at /home/tvshowmu/public_html/core/xpdo/om/mysql/connect.inc.php:12) in /home/tvshowmu/public_html/setup/includes/modinstallrequest.class.php on line 98

    Any help?
      • 28215
      • 4,149 Posts
      Your database is in latin1, and you’re trying to set the character set to utf8. You can’t do that. They have to match.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 3749
        • 24,544 Posts
        If you’d like to convert your MODx database to utf8, there’s a utility here to do that:

        http://bobsguides.com/convert-db-utf8.html

        I’ve had a lot fewer charset problems after converting my DBs to utf8.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 1921
          • 32 Posts
          Your database is in latin1, and you’re trying to set the character set to utf8. You can’t do that. They have to match.

          That makes sense. I just thought that when I originally installed Modx on a test server, I had it set to utf8 for the very reason BobRay says. Maybe in the transfer to the live site the database got converted back to latin1? Either way I’ll give it another shot in a couple of days. Thanks guys, you saved me a lot of pain.

          Edited to add: Just checked on the system settings page in Modx and on phpMyAdmin and it seems that everything is set correctly to utf8. Is there some other place this could be latin1 that I’m missing? It doesn’t make much sense to me in this regard.
            • 3749
            • 24,544 Posts
            In PhpMyAdmin, did you check the character set of the DB, the Tables, and the text Fields in each table? Setting the Collation to utf-8 won’t change those if the data in the tables is Latin1.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 1921
              • 32 Posts
              Looking at the tables in the database, they are all labeled utf8-general.

              Whoops, as I look at the bottom where it says 62 tables... it does say latin_swedish_ci. If I select latin_swedish_ci when doing the upgrade, would that cause any problems?
                • 3749
                • 24,544 Posts
                Quote from: apmkk at Jul 26, 2010, 11:49 AM

                Looking at the tables in the database, they are all labeled utf8-general.

                Whoops, as I look at the bottom where it says 62 tables... it does say latin_swedish_ci. If I select latin_swedish_ci when doing the upgrade, would that cause any problems?

                I’ve always found I’m a lot happier if *Everything* is set to the same charset, whether it’s utf8 or Latin1. Otherwise, every time you have a problem of any kind, you wonder if it might be caused by mismatched charsets. I would never want tables in a DB to use more than one charset.

                If it were my site, I’d back up the site, run the conversion utility I provided the link to above, and set everything to utf8. Just my $.02. smiley
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting