We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48386
    • 4 Posts
    Hello all,

    I have searched a lot but didn't find any similar issues, so hopefully it's not a repost of the problem.

    I have a ModX site with few extras (TinyMCE, WayFinder, getResources, BannerY, GoogleSiteMap, Babel) witch was working fine, but now I had to move it to another server. I did everything as I always do (copy the files and database, change the server paths in the config files, re-run setup, ...) and the front-end of the site works fine, but I have problems with the back-end. I navigate to /manager and the login screen pops up, I input my details, login and all I get is a completely white screen, even if I inspect the code nothing is in there.

    Another thing is, that in the same time I had to move a different site from the same server to the same server as the site above, with basically the only difference is that this site doesn't have Babel extra, followed the same steps with the move and the site and manager is working as it should, thats why I have a feeling Babel is got something to do with it.

    Just to clarify I am using MODX Revolution 2.2.9-pl and babel-2.2.5-pl.

    Thanks for your replays and if anything is not clear or you would need more data to help me resolve my issue please do let me know.
    • @tomazb make sure it's not the compress js/compress css issue that can sometimes happen. If it is try follow this tutorial i made about that http://jesseshowalter.com/foundry/modx-and-godaddy-compress-js-css/
        Mahalo,
        Jesse Showalter

        My Portfolio: http://www.jesseshowalter.com
        MODX Video Tutorials: http://jesseshowalter.com/search-results.html?search=MODX&id=22
        • 48386
        • 4 Posts
        Hello,

        Thank you for your replay, I did try that but I'm afraid it didn't work. I can see in your video that you still have the top menu, in my case thou I have blank page, if I check the source code it's completely empty, and I did move another site from the same previous server to the same new server as this one without any problems.
        • Quote from: tomazb at Jul 26, 2014, 10:45 AM
          Hello,

          Thank you for your replay, I did try that but I'm afraid it didn't work. I can see in your video that you still have the top menu, in my case thou I have blank page, if I check the source code it's completely empty, and I did move another site from the same previous server to the same new server as this one without any problems.

          Watch out for FTP transferring files, it can sometimes corrupt or completely miss files, did you try re-uploading the files (merging them) and then re running the install?
            Mahalo,
            Jesse Showalter

            My Portfolio: http://www.jesseshowalter.com
            MODX Video Tutorials: http://jesseshowalter.com/search-results.html?search=MODX&id=22
            • 3749
            • 24,544 Posts
            See the method here for transferring the files: http://bobsguides.com/modx-upgrade-faq.html (then run setup again). As Jesse says, missing or corrupted files are fairly common when you use FTP to transfer them individually.

            Some other things to try:


            • Turn off the compress_js and compress_css System Settings (in the modx_system_settings table in the DB, if necessary. Change the 1 to a 0).
            • Delete all files in the core/cache directory

            • Clear your browser cache *and cookies*

            • See if there's anything relevant in the MODX Error Log (core/cache/logs/error.log).

            BTW, there are some serious security problems that have been fixed in more recent versions, though you should definitely try to get the site working before upgrading. I'd recommend 2.2.15.


              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
              • 48386
              • 4 Posts
              Hello,

              Sorry for the late replay, had a quick break from work smiley

              Thanks for the replays. I have already tried to re-upload the whole website 3 times, changed the compress css and js and clear the cache so many times, but still nothing. I did totally forgot about the error.log, thanks for that, and I found a bunch of code in there witch is more or less the same, pasting the last part of it:
              [2014-06-16 19:49:28] (ERROR in xPDOConnection::connect @ /my_server_base_path/core/xpdo/xpdo.class.php : 3031) SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
              [2014-06-16 19:49:28] (ERROR in xPDOConnection::connect @ /my_server_base_path/core/xpdo/xpdo.class.php : 3031) SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
              [2014-06-16 19:49:28] (ERROR in xPDOConnection::connect @ /my_server_base_path/core/xpdo/xpdo.class.php : 3031) SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
              [2014-06-16 19:49:46] (ERROR in xPDOConnection::connect @ /my_server_base_path/core/xpdo/xpdo.class.php : 3031) SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
              [2014-06-16 19:50:03] (ERROR in xPDOConnection::connect @ /my_server_base_path/core/xpdo/xpdo.class.php : 3031) SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
              [2014-06-16 19:50:03] (ERROR in xPDOConnection::connect @ /my_server_base_path/core/xpdo/xpdo.class.php : 3031) SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
              [2014-06-16 19:50:03] (ERROR in xPDOConnection::connect @ /my_server_base_path/core/xpdo/xpdo.class.php : 3031) SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
              [2014-06-16 19:50:36] (ERROR in xPDOConnection::connect @ /my_server_base_path/core/xpdo/xpdo.class.php : 3031) SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'waiting for initial communication packet', system error: 95
              [2014-06-16 19:50:52] (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` = ?  - 
              [2014-06-16 19:50:37] (ERROR in xPDOConnection::connect @ /my_server_base_path/core/xpdo/xpdo.class.php : 3031) SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'waiting for initial communication packet', system error: 95
              [2014-06-16 19:50:57] (ERROR @ /index.php) Error preparing statement for query: SELECT `modResource`.* FROM `modx_site_content` AS `modResource` WHERE  ( `modResource`.`id` = ? AND `modResource`.`deleted` = ? )   - Array
              (
                  [0] => 00000
                  [1] => 
                  [2] => 
              )
              
              [2014-06-19 01:44:36] (ERROR @ /index.php) Attempted to redirect to an empty URL.
              [2014-06-19 05:44:50] (ERROR @ /index.php) Attempted to redirect to an empty URL.
              [2014-06-19 07:25:33] (ERROR @ /index.php) Attempted to redirect to an empty URL.
              [2014-07-21 06:34:47] (ERROR @ /index.php) Attempted to redirect to an empty URL.
              [2014-07-22 16:29:56] (ERROR @ /index.php) Attempted to redirect to an empty URL.
              [2014-07-30 10:34:44] (ERROR @ /index.php) Attempted to redirect to an empty URL.
              [2014-07-31 14:31:11] (ERROR @ /index.php) Attempted to redirect to an empty URL.


              I did google the error and it seems it should be because of the wrong database connections, I have re-check them and they all seem fine, I'm even more certain about it because in the front-end all of the content is there, all the templates look right, everything is working OK, but when I log into the manager I get a completely blank screen.

              It really bugs me because I can't seem to find a solution, I've been using ModX for a long time now and this is the first time I got this error sad
                • 3749
                • 24,544 Posts
                The DB errors are really weird. There's no way MODX can show the front end without connecting to the DB.

                I'm starting to suspect that MODX is losing the session. That would keep you from logging in to the Manager, and it might explain the loss of the DB connection.

                Try turning off the use_friendly_urls System Setting in the modx_system_settings table in the DB. Then rename .htaccess, so there isn't one. While you're there, in that same table, turn off the compress_js and compress_css settings if you haven't already.

                See if that gets you into the Manager.
                  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
                • You can also rename the ht.access in your /manager/ directory to .htaccess, that contains a single directive to turn off the rewrite engine for the Manager.

                  Do you have anything unusual about your installation? Renamed folders, core outside of the web space, anything you can think of? Is the database server 'localhost', or a different server?

                  Sessions shouldn't have anything to do with connecting to the database. In fact, a problem connecting to the database would certainly mean no session, at least if you're using the default session handler.
                    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
                    • 3749
                    • 24,544 Posts
                    I'm thinking that the DB connection must be being made, because the front end works. If the session is lost during the Login process, wouldn't that break the connection to the DB? That fits the OP's symptoms.
                      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
                    • I suspect something more server-level going on here. That 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' looks more like some kind of mixup involving PHP script users and file permissions.

                      A few things I'd try.

                      First, check the database for tables that need repair and optimization.

                      Second, if you have control of the server, restart the MySQL server. Actually, I'd restart all of the servers, database, PHP and web.

                      Third, rename the ht.access in the /manager/ directory to turn off the rewrite engine for the Manager.

                      Finally, get into the database and disable the Babel plugin you are using. Personally, when I was using Babel, I used a plugin that didn't require any .htaccess directives. https://gist.github.com/gadamiak/3812853
                        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