We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10525
    • 247 Posts
    I have two distinct errors which coincide with my website going down (blank white page). I can't access the manager either.

    The following extract from my modx error log shows:
    ERROR in xPDOConnection::connect @ ...
    and
    Could not load class: modResponse from modresponse error.

    (The There was an error retrieving or creating session id: xxxxxxxxxxxxxxxxxxxxxxxxxx lines are always there, but I read that this is just an unfixed bug).

    Can anyone tell me if one or both of these errors are likely to be the cause of the site going down and, if so, offer any explanation/fix for this?

    Many thanks.

    [2015-05-18 05:21:25] (INFO @ /index.php) There was an error retrieving or creating session id: xxxxxxxxxxxxxxxxxxxxxxxxxx
    [2015-05-18 05:25:26] (ERROR in xPDOConnection::connect @ /var/www/vhosts/my_domain.com/httpdocs/core/xpdo/xpdo.class.php : 3054) SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    [2015-05-18 05:25:26] (ERROR in xPDOConnection::connect @ /var/www/vhosts/my_domain.com/httpdocs/core/xpdo/xpdo.class.php : 3054) SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    [2015-05-18 05:25:26] (ERROR @ /index.php) Error preparing statement for query: SELECT `modSession`.`id` [2015-05-18 05:38:13] (INFO @ /index.php) There was an error retrieving or creating session id: xxxxxxxxxxxxxxxxxxxxxxxxxx
    [2015-05-18 05:43:12] (INFO @ /index.php) There was an error retrieving or creating session id: xxxxxxxxxxxxxxxxxxxxxxxxxx
    [2015-05-18 05:48:12] (INFO @ /index.php) There was an error retrieving or creating session id: xxxxxxxxxxxxxxxxxxxxxxxxxx
    [2015-05-18 05:49:14] (INFO @ /index.php) There was an error retrieving or creating session id: xxxxxxxxxxxxxxxxxxxxxxxxxx
    ...

    [2015-05-19 12:46:11] (INFO @ /index.php) There was an error retrieving or creating session id: xxxxxxxxxxxxxxxxxxxxxxxxxx
    [2015-05-19 12:46:11] (ERROR @ /index.php) Could not load class: modResponse from modresponse.
    [2015-05-19 12:47:45] (ERROR @ /index.php) Could not load class: modResponse from modresponse.
    [2015-05-19 12:47:47] (ERROR @ /index.php) Could not load class: modResponse from modresponse.
    [2015-05-19 12:57:13] (INFO @ /index.php) There was an error retrieving or creating session id: xxxxxxxxxxxxxxxxxxxxxxxxxx
    [2015-05-19 12:57:13] (ERROR @ /index.php) Could not load class: modResponse from modresponse.
    [2015-05-19 13:00:44] (INFO @ /index.php) There was an error retrieving or creating session id: xxxxxxxxxxxxxxxxxxxxxxxxxx
    [2015-05-19 13:00:44] (ERROR @ /index.php) Could not load class: modResponse from modresponse. xxxxxxxxxxxxxxxxxxxxxxxxxx
    [2015-05-19 13:11:11] (INFO @ /index.php) There was an error retrieving or creating session id: xxxxxxxxxxxxxxxxxxxxxxxxxx
    [2015-05-19 13:11:11] (ERROR @ /index.php) Could not load class: modResponse from modresponse.
    (All instances of xxxxxxxxxxxxxxxxxxxxxxxxxx shown replace num-char strings which are different in each line)
    • [2015-05-18 05:25:26] (ERROR in xPDOConnection::connect @ /var/www/vhosts/my_domain.com/httpdocs/core/xpdo/xpdo.class.php : 3054) SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
      That looks to me like you have a problem with the database.
        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
        • 10525
        • 247 Posts
        Thanks Susan, I'll have a look.

        I also found this error in the server error log:

        [Tue May 19 17:23:24 2015] [warn] [client 5.xxx.253.xxx] mod_fcgid: stderr: PHP Fatal error: Class name must be a valid object or a string in /var/www/vhosts/my_domain.com/httpdocs/core/model/modx/modx.class.php on line 1382

        According to the database I'm using 2.2.14-pl. Upgrade required.
        • Well, if it can't connect to the database, all kinds of things won't be found, since most of MODX depends on the database.
            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
            • 10525
            • 247 Posts
            Aye, you're right.

            Just tried to upgrade and it gets stuck on http://my_domain.com/setup/index.php?action=summary with a blank white page.

            Incidentally, the first page when upgrading shows the modx version at the top. Do you know if this the current or the new version?
            • Should be the new version.
                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
                • 44580
                • 189 Posts
                As Susan said, this looks like a database issue. Suggest you restart Mysql before you try anything else. If you're running Ubuntu: sudo restart mysql. If it fails to start, you'll need to dig into the Mysql logs.
                  • 10525
                  • 247 Posts
                  Thanks gissirob,

                  I'm on a shared hosting package, so no server access other than Plesk.

                  If I select Advanced Upgrade Install to go to
                  http: //my_domain.com/setup/index.php?action=database
                  , then punch in a wrong Database login name and click "→ Test database server connection and view collations", I get an expected "can't connect" error in the log. Otherwise, if all the database settings are correct I click the link and nothing happens, with no logged error.
                    • 44580
                    • 189 Posts
                    Based on what you said above I still think it is a Mysql issue. I suggest you look at your Plesk admin tools. I've never used Plesk but there must be some sort of Server Admin function that should allow you to look at the status of services like mysql and hopefully re-start them if they need to be.
                      • 10525
                      • 247 Posts
                      My hosting folks had a look at MySQL and said it was running normally.

                      Anyway, I finally managed to complete the upgrade.

                      It turned out I was the victim of my familiar old friend, Plesk's merge-replace function that doesn't actually work. I upload the modx zip file, unpack it into its own subdir, then copy the contents to the httpdocs dir, being careful to select "Replace existing files". This should copy the dir structure, replacing existing files with the same names. But it doesn't always do that, instead preferring to copy the new directories inside the targets dirs. It's a major pain.

                      This reason alone has led me to many a problem with upgrades and maybe been the cause of hacking because I've been out of date. (I do occasionally still find dirs containing duplicates of themselves from previous upgrades). It would be a great benefit to the people that host on Plesk servers to be able to do "one-click" upgrades, similar to the way extras are installed.

                      How did I get round the problem? I zipped my entire modx installation, downloaded in to my Windows 8 machine, did the merge-replace there, zipped it back up, uploaded and the upgrade went perfectly. Ugly, but it works.

                      All the previous errors now gone and I'm back with my normal session id messages....

                      [2015-05-20 19:02:59] (INFO @ /index.php) There was an error retrieving or creating session id: n513h5j42fft82recg27tcpk10
                      [2015-05-20 19:04:27] (INFO @ /index.php) There was an error retrieving or creating session id: efbdguhs86pl2096k3rkgl1465
                      [2015-05-20 19:08:00] (INFO @ /index.php) There was an error retrieving or creating session id: orria37maqmb3kkhef8un31a10
                      [2015-05-20 19:09:09] (INFO @ /index.php) There was an error retrieving or creating session id: 79mib461n9sc6uaoeebkvl6103
                      [2015-05-20 19:14:11] (INFO @ /index.php) There was an error retrieving or creating session id: 12l5b3r7s0gd0g8fpq235f3hb0
                      [2015-05-20 19:19:10] (INFO @ /index.php) There was an error retrieving or creating session id: bbjprr20j1k3mjkfro9lmkg120
                      [2015-05-20 19:24:16] (INFO @ /index.php) There was an error retrieving or creating session id: n7mo9helf3ug0am0gcnt3ch8n1
                      [2015-05-20 19:29:14] (INFO @ /index.php) There was an error retrieving or creating session id: hdmqopkgfm3895sme5n0seh323
                      [2015-05-20 19:29:33] (INFO @ /index.php) There was an error retrieving or creating session id: sdeherh494jk6a7gmik6vl1cl7

                      Thanks guys for taking the time to comment.