We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    Bad idea. This is a very complex situation, and can easily trash your data. As long as your config.inc.php has the connection_charset set to match your database, you should be all right.
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 28033
      • 925 Posts
      Quote from: sottwell at Feb 19, 2008, 06:56 PM

      Bad idea. This is a very complex situation, and can easily trash your data. As long as your config.inc.php has the connection_charset set to match your database, you should be all right.

      Okay then...so then in theory, WLPE and WebSignup shouldn’t be causing issues, since MODx and the database are set to UTF-8 Unicode (utf8) for their connnection charset (and the collation of the database as a whole matches the collation of each table), right?

      So it makes no sense why there’s an issue here. I know that creating users in the Manager works just fine, but try to do it w/ either app, and you either get usergroups not being set + "username already exists", or a "username wasn’t entered".

      Does this mean that there’s some server configuration issue that exists here? Should I mention anything from the phpinfo page that could tell if there’s a configuration issue? I’m at a loss as to why there’s an issue here...
        My Snippets
        -> PopUpChunk v1.0
        • 20289
        • 958 Posts
        Quote from: Soshite at Feb 19, 2008, 06:50 PM

        I assume by changing the latin1 -> utf8, this would fix my issue, correct? Now, two things. I can easily change over the charset collation option on the "homepage" for phpMyAdmin, but what SQL command should I use to change the Collation option under Table options? And I see a bunch of options --- should I use utf8_swedish_ci, or utf8_unicode_ci?

        latin1_swedish_ci is the default connection collation for almost every US/Europe based servers, as long as the connection-collation differs from charset you will have crazy issues in those tables that db needs to transfer a mismatching collation/charset data.
        basically you have to set utf8_general_ci (preferably) or utf8_unicode_ci in case you need to make a connection over utf8 charset db.

        I had a serious issues like this a multiple times in early days of configuring the correct set of db settings to cooperate fairly with MODx configuration and yet couldn’t find any SQL command to make change to individual tables, so i just decided to double check the db environmental settings to meet a true utf8 compatible site at the time of MODx installation.

        I remember that susan has implemented a nice db colation check tab in MODx manager interface but unfortunately i don’t have a reference link right now, she is here so she can possibly find it and give you the reference, then only you can check whether every thing is set as you preferred to by that.
          [img]http://i10.tinypic.com/52c4eir.gif[/img][/td]
          [td][Wiki] [Persian support forum]
          [SVN] [RTL SVN Branch] [bugs] [FishEye+Crucible] [Learn MODx!] | [My Google Code]
          [font=tahoma][برای دسترسی به راهنمای فارسی به [url=http://www.modxcms.ir]
          • 28033
          • 925 Posts
          Quote from: MotSmart at Feb 20, 2008, 07:00 AM

          latin1_swedish_ci is the default connection collation for almost every US/Europe based servers, as long as the connection-collation differs from charset you will have crazy issues in those tables that db needs to transfer a mismatching collation/charset data.
          basically you have to set utf8_general_ci (preferably) or utf8_unicode_ci in case you need to make a connection over utf8 charset db.

          I had a serious issues like this a multiple times in early days of configuring the correct set of db settings to cooperate fairly with MODx configuration and yet couldn’t find any SQL command to make change to individual tables, so i just decided to double check the db environmental settings to meet a true utf8 compatible site at the time of MODx installation.

          I remember that susan has implemented a nice db colation check tab in MODx manager interface but unfortunately i don’t have a reference link right now, she is here so she can possibly find it and give you the reference, then only you can check whether every thing is set as you preferred to by that.

          Okay, so basically, since the collation is latin1, and the charset is UTF-8, that’s causing the mismatch? And if I happened to, let’s say, go into each table and change it to utf8_general_ci, like you said, that might cause corruption issues?

          (I’ll try looking for susan’s tool when I get home from my Physics II lecture this afternoon. smiley BTW, thanks for your help in explaining that. I *think* I’m starting to understand all this charset stuff now.  laugh)

          EDIT: http://modxcms.com/forums/index.php/topic,21819.0.html --- I guess that’s what you were referring to?

          http://modxcms.com/forums/index.php/topic,19472.msg121289.html#msg121289 --- Hmm...I’ll have to check and see if that caused the issue, since I think I installed the RC...
            My Snippets
            -> PopUpChunk v1.0
            • 3749
            • 24,544 Posts
            Soshite, Iirc, your problem was that new users were being seen as *already in* the database. I don’t see any way that charset encoding could cause that problem. Charset problems usually manifest themselves as odd-looking characters on the screen or sometimes unrecognized usernames and/or passwords for people using less-common languages. If you’re not seeing those symptoms, the character set settings are probably fine and trying to fix them could really mess things up.

            You wouldn’t be the first person who, on having a mysterious database-related problem in MODx, got drawn into the soul-sucking, endless black hole of MySQL character sets and collations. wink wink

            Bob
              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
              • 28033
              • 925 Posts
              Quote from: BobRay at Feb 20, 2008, 11:09 AM

              Soshite, Iirc, your problem was that new users were being seen as *already in* the database. I don’t see any way that charset encoding could cause that problem. Charset problems usually manifest themselves as odd-looking characters on the screen or sometimes unrecognized usernames and/or passwords for people using less-common languages. If you’re not seeing those symptoms, the character set settings are probably fine and trying to fix them could really mess things up.

              You wouldn’t be the first person who, on having a mysterious database-related problem in MODx, got drawn into the soul-sucking, endless black hole of MySQL character sets and collations. wink wink

              Bob


              So what was causing the issue of users already being seen in the database w/ WLPE, or the "username isn’t entered" error w/ WebSignup? I would think that would be something related to either the database or the PHP settings.

              I attached an image of the Report page, which has the database-related info that susan created a "hack" to show. The other one is from the Configuration tab. Is there an issue w/ this setup? It seems odd that the database says latin, while MODx says UTF-8. BTW, there’s only latin3 and latin9 in the Config tab.
                My Snippets
                -> PopUpChunk v1.0
                • 3749
                • 24,544 Posts
                Quote from: Soshite at Feb 20, 2008, 11:51 AM


                So what was causing the issue of users already being seen in the database w/ WLPE, or the "username isn’t entered" error w/ WebSignup? I would think that would be something related to either the database or the PHP settings.

                I wish I knew. I feel bad that no one has come up with a workable solution for you.


                I attached an image of the Report page, which has the database-related info that susan created a "hack" to show. The other one is from the Configuration tab. Is there an issue w/ this setup? It seems odd that the database says latin, while MODx says UTF-8. BTW, there’s only latin3 and latin9 in the Config tab.

                What does the line in your manager/includes/config.inc.php file say?


                Bob
                  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
                  • 28033
                  • 925 Posts
                  Quote from: BobRay at Feb 20, 2008, 12:52 PM

                  What does the line in your manager/includes/config.inc.php file say?


                  Bob

                  UTF-8, IIRC. Same as the Configuration page in the Manager (it has latin options, but only latin3 and latin9, which don’t work).

                  I think, for the time being, I’ll manually create accounts. My "other" site is using SMF for it’s forum, so I should be able to redirect signups to the forum, which will in turn sync w/ MODx.

                  (It’ll be funny if this was caused by one stray option or a bad line of code, ala what happened w/ EN lang.php for WLPE a while ago. tongue)
                    My Snippets
                    -> PopUpChunk v1.0
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    The exact content of that line is important. It has to be in a specific form or it won’t work.

                    http://dev.mysql.com/doc/refman/5.1/en/charset-unicode.html
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 7231
                      • 4,205 Posts
                      It seems odd that the database says latin, while MODx says UTF-8. BTW, there’s only latin3 and latin9 in the Config tab.
                      It is my understanding that this does not mean much. The top image is the database server settings (this is used for connecting to the database and other behind the scenes stuff). While the second is the specific database setting. In modern databases these can be different since they are used for different things. My understanding is from the docs at Mysql. I will look for the exact page that led me to believe this.

                      Your problem lies someplace else IMO shocked
                        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                        Something is happening here, but you don't know what it is.
                        Do you, Mr. Jones? - [bob dylan]