We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8642
    • 28 Posts
    On a clients site, MODx has recently decided to just dump the content of modx_site_content.content to the browser, without using the templates. I’ve tried searching Jira, but couldn’t find anything relevant.

    All the files seem to be there and in order, the database is ok, but the pages aren’t served properly. It’s really frustrating, especially since she is a graphic designer and the site is supposed to show off her work, but now it only shows text...

    There are pages with id’s from 1 to 60 if anyone wants to check via index.php?id=#.

    I can’t log in to the manager, it says "That account could not be located. Check the username and re-type the password to try again.". I’ve checked the database and the accounts exist, and the passwords are correct. Even tested doing MD5 hashes and comparing them to the stored hash in the database.

    URL: http://ww.tintinblackwell.com/

    System info:
    2.0.5-pl (traditional)
    Linux 2.6.32.32-grsec
    PHP version 5.3.6
    MySQL client API version 5.1.56
    MySQL 5.1.56-log,
    pdo-mysql is installed
    Unsure abut opcode caching but server runs Zend Engine v2.3.0 with ionCube Loader v4.0.5 and Zend Guard Loader v3.3
    Apache 2

    I have other sites running on the same server, and they work just fine.

    I find this in the error.log, over and over:

    [2011-03-28 09:06:06] (ERROR in xPDO::connect @ /home/d28635/public_html/core/xpdo/xpdo.class.php : 331) SQLSTATE[HY000] [2019] Can’t initialize character set (path: /usr/local/mysql/share/mysql/charsets/)
    [2011-03-28 09:06:06] (ERROR in xPDO::connect @ /home/d28635/public_html/core/xpdo/xpdo.class.php : 331) SQLSTATE[HY000] [2019] Can’t initialize character set (path: /usr/local/mysql/share/mysql/charsets/)
    [2011-03-28 09:06:06] (ERROR @ /index.php) Error preparing statement for query: SELECT `modSession`.`id` AS `modSession_id`, `modSession`.`access` AS `modSession_access`, `modSession`.`data` AS `modSession_data` FROM `modx_session` AS `modSession` WHERE `modSession`.`id` = ? -
    [2011-03-28 09:06:06] (ERROR in xPDO::connect @ /home/d28635/public_html/core/xpdo/xpdo.class.php : 331) SQLSTATE[HY000] [2019] Can’t initialize character set (path: /usr/local/mysql/share/mysql/charsets/)
    [2011-03-28 09:06:06] (ERROR in xPDO::connect @ /home/d28635/public_html/core/xpdo/xpdo.class.php : 331) SQLSTATE[HY000] [2019] Can’t initialize character set (path: /usr/local/mysql/share/mysql/charsets/)
    [2011-03-28 09:06:06] (ERROR in xPDO::connect @ /home/d28635/public_html/core/xpdo/xpdo.class.php : 331) SQLSTATE[HY000] [2019] Can’t initialize character set (path: /usr/local/mysql/share/mysql/charsets/)
    [2011-03-28 09:06:06] (ERROR in xPDO::connect @ /home/d28635/public_html/core/xpdo/xpdo.class.php : 331) SQLSTATE[HY000] [2019] Can’t initialize character set (path: /usr/local/mysql/share/mysql/charsets/)
    [2011-03-28 09:06:06] (ERROR @ /index.php) Error preparing statement for query: SELECT `modResourceGroupResource`.`id` AS `modResourceGroupResource_id`, `modResourceGroupResource`.`document_group` AS `modResourceGroupResource_document_group`, `modResourceGroupResource`.`document` AS `modResourceGroupResource_document` FROM `modx_document_groups` AS `modResourceGroupResource` WHERE `modResourceGroupResource`.`document` = ? -
      • 22303 MODX Staff
      • 10,725 Posts
      Sounds like someone broke your MySQL installation based on those errors. I would report that to your administrator.
        • 8642
        • 28 Posts
        Just got word back from the server admins. They did a minor upgrade to PHP a while back, and now you have to have $database_connection_charset set in core/config/config.php. According to the documentation they had it looked as if that was optional, but it is required. Once that was fixed the site started behaving as it should again.

        Weird problem though.
          • 21792
          • 37 Posts
          We’ve had a minor php and mysql upgrade to our server over the weekend

          We have about 20 client sites on modx 2.0.x.

          Sites that had been installed on our old server (2.0.2), migrated and upgraded still had $database_connection_charset = ’’; whereas sites installed directly on our new server (2.0.4+) had this value set.

          Took me 90 minutes of searching/testing/debugging etc etc before I looked at the MODx error logs, which in turn lead me to this post

          many thanks to elander for showing me the fix!!!!