We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19872
    • 1,078 Posts
    I confirmed that MySQL version meets needs of MODx, and through my hosting service control panel was able to determine the charset is: utf8 and collation is utf8_unicode_ci

    However, when I get to the charset / collation step in Setup, the fields display: Latin1 and Latin1_swedish_ci

    Do I change to the info that I found through my hosting control panel for the database (utf8 and utf8_unicode_ci)? Is MODx setup gathering MySQL info and putting it into those fields, or is the Latin1 and Latin1_swedish_ci just a random default setting:

    I did an intall on a goDaddy server a couple of days ago and all went pretty smooth. On that setup, the charset and collation that displayed were utf8 and utf8_general_ci. I just clicked OK and all went OK.

    Now, on a myHosting Linux server, I'm getting hung up. I get to the end of the setup, I get a parse error "Parse error: syntax error, unexpected '{' in /usr/......../core/config/config.inc.php on line 13
    I'm deleting all of the MODx install and starting over, but having to have the Host company delete the core folder, as I cannot delete, move or change it.

    I had found an earlier post where someone had the same issue, and thought is revolved around the charset settings, but I could not tell actually if that was the problem and/or how they fixed it.
      • 19872
      • 1,078 Posts
      I have another MODx install on another site located on the same server that I am attempting to install on today. Just for kicks, I look at it's database, or at least the MODx charset and collation and they are set to Latin1 and Latin1_swedish_ci. All I can figure is that I assumed MODx new what it was doing, and I didn't change anything.

      So... I will give that a try and see if I can achieve a successful install. Certainly—installing on goDaddy is a bit easier than myHosting.

      Big question though:
      Does it matter what the charset and collation are? (Stupid question?). I'm not swedish, so why is MODx thinking the charset and collation need to be in Swedish?

      Any feedback generously appreciated. Tips. Tidbits. Even, poke fun at my inexperience if you may.
        • 22303 MODX Staff
        • 10,725 Posts
        Quote from: mmcgee at Jan 06, 2013, 05:54 PM
        I have another MODx install on another site located on the same server that I am attempting to install on today. Just for kicks, I look at it's database, or at least the MODx charset and collation and they are set to Latin1 and Latin1_swedish_ci. All I can figure is that I assumed MODx new what it was doing, and I didn't change anything.

        So... I will give that a try and see if I can achieve a successful install. Certainly—installing on goDaddy is a bit easier than myHosting.

        Big question though:
        Does it matter what the charset and collation are? (Stupid question?). I'm not swedish, so why is MODx thinking the charset and collation need to be in Swedish?

        Any feedback generously appreciated. Tips. Tidbits. Even, poke fun at my inexperience if you may.

        The default MySQL collation (at least for legacy releases of MySQL) was latin1_swedish_ci, and still is on many hosts. I recommend using a utf8 collation with Revolution. Make sure you create the database with this collation before installing MODX, or regardless of what you choose during setup, the database tables will store data in the actual collation set for the database, translating to and from the collation you choose during setup for use with MODX. This translation is not always lossless, as some characters cannot be translated from one collation to another.
          • 3749
          • 24,544 Posts
          If you want to convert after the fact, you can see this: http://bobsguides.com/convert-db-utf8.html, though it's a tedious process and I always create the MODX DB manually for with utf8 before installing MODX.
            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
            • 19872
            • 1,078 Posts
            Hi Bob: I still owe you a bread recipe! Been buried lately and just now getting back into working with MODx again.

            Thank you Bob & Jason for your quick response. I deleted MODx from the server and did the install again. This time I set the charset to utf8 and collation to utf8_general_ci and the setup went fine, except a bunch of errors at the end related to MODx not being able to delete the setup folder. I then manually deleted the setup folder.

            When I set up the data base on myHosting, I was not given the option to determine the charset & collation. I only uncovered what is was through the phpmyadmin after the fact. This database stuff is completely over my head, and from what I read at http://www.bluebox.net/about/blog/2009/07/mysql_encoding/ , many issues can arise with mismatching as you have pointed out.

            I've opened phpmyadmin and it displays the following in the main panel: MySQL charset: UTF-8 Unicode (utf8) and MySQL connection collation: utf8_unicode_ci

            But, even though I had selected uft8 for charset and utf8_general_ci during the setup, the tables in phpmyadmin shows the collation as latin1_swedish_ci

            So...does this mean I should start over again? Find a different host? Certainly, I need to learn more about database management, but for now, I just want to be creative and build in MODx.
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: mmcgee at Jan 07, 2013, 06:52 AM

              When I set up the data base on myHosting, I was not given the option to determine the charset & collation. I only uncovered what is was through the phpmyadmin after the fact. This database stuff is completely over my head, and from what I read at http://www.bluebox.net/about/blog/2009/07/mysql_encoding/ , many issues can arise with mismatching as you have pointed out.

              I've opened phpmyadmin and it displays the following in the main panel: MySQL charset: UTF-8 Unicode (utf8) and MySQL connection collation: utf8_unicode_ci

              But, even though I had selected uft8 for charset and utf8_general_ci during the setup, the tables in phpmyadmin shows the collation as latin1_swedish_ci

              So...does this mean I should start over again? Find a different host? Certainly, I need to learn more about database management, but for now, I just want to be creative and build in MODx.
              You have to go to the database in phpMyAdmin and change the collation to what you want to use BEFORE you install MODX or the tables will be created with the collation set specifically for the database. See the Operations tab when looking at the database in phpMyAdmin...
                • 19872
                • 1,078 Posts
                OK. But the collation—according to phpmyadmin—was and is utf8_unicode_ci.

                So then why after installing MODx and selecting uft8_general_ci for the collation in the setup field are my tables in phpmyadmin showing up with collation of latin1_swedish_ci?

                So... here I am with tables that are showing up with collation of latin1_swedish_ci, even though I selected uft9_general_ci in the setup.
                Do I start over and delete MODx and then fiddle with the database?
                Is it easier to start over than it is to change the collation at this point?

                Odd, that when I installed a version of MODx on a goDaddy server last week, everything went great—except for a compress_css and compress_js issue that I was able to resolve with quick help through the MODx forum.
                  • 19872
                  • 1,078 Posts
                  I'm reading through Bob's conversion script notes, and determining whether to give it a try or not. I think I'm up for a challenge, and I'm sure that I can learn something in the process. Then again, I could just get my database guy on the case (kidding!) I AM the database guy, which is why I know I'm whirling myself toward death & destruction.

                  If I choose to delete MODx and Drop the tables and start over, only drawback is my inability to delete the core directory and a couple of it's contents that are inexplicably locked—preventing deletion or permission changes. I have to have to host delete it for me. They may start getting annoyed:)
                  [ed. note: mmcgee last edited this post 13 years, 8 months ago.]
                    • 19872
                    • 1,078 Posts
                    Haven't starting any changes yet, but after reading through the cdc instructions, thought I would grab those config.inc.php files and review them.

                    I do not have an 'includes' directory in the 'manager' directory the manager/includes/config.inc.php


                    This is from the config.inc.php found in core/config/config.inc.php. No mention of swedish collation


                    * MODX Configuration file
                    */
                    $database_type = 'mysql';
                    $database_server = (commented out)
                    $database_user =(commented out)
                    $database_password = (commented out)
                    $database_connection_charset = 'utf8';
                    $dbase = (commented out)
                    $table_prefix = 'tmd_';
                    $database_dsn =(commented out);charset=utf8';
                    $config_options = array (
                    );
                    $driver_options = array (
                    );
                      • 19872
                      • 1,078 Posts
                      Thanks for all of your help Jason and Bob. I got distracted and had to step away from the process. Hoping to delve back in today and give this another go. Not sure which path I'll take—reinstall, or attempt to run the cdc.