We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 52858
    • 8 Posts
    Currently running Revolution 2.6.5 on php 5.6.16 with no problems.

    I'm trying to upgrade to php 7.2.6. I have php 7 installed but when I switch the module in my Apache conf, and then restart apache, the site only partially works (many pages just don't load but instead only load the home page). But more importantly I can't login to the site Manger under php7, it just refreshes and re-prompts for the user/pass. Yet if I revert back to php 5.6 and refresh, I'm still logged in.

    I've checked the modx cache logs and I'm getting a lot of errors that say this:

    [2018-08-13 10:58:42] (ERROR in xPDOConnection::connect @ /var/www/html/settings/[redacted_path]/core/xpdo/xpdo.class.php : 3119) SQLSTATE[HY000] [2002] No such file or directory

    It says this file doesn't exist, but it's there. I can vim that path and it opens fine. And the site manager works great under php 5.6.

    I've also previously followed many of the steps to harden my sites...could that be causing the problem.

    Thanks for your help,
    Andrew

    This question has been answered by wingnutty. See the first response.

      • 3749
      • 24,544 Posts
      Check the config.core.php files in the modx root, connectors, and manager directories to make sure they're pointing to the actual core location.
        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
        • 52858
        • 8 Posts
        Quote from: BobRay at Aug 13, 2018, 08:42 PM
        Check the config.core.php files in the modx root, connectors, and manager directories to make sure they're pointing to the actual core location.

        I just checked an they are all pointing to the actual core location. If they weren't, wouldn't it also be a problem under php 5.6?
          • 3749
          • 24,544 Posts
          Yes, normally, but some people replace them by accident.

          Take a look at all the paths and URLs in the core/config.config.inc.php file. Sometimes Setup updates the paths incorrectly.

          If those are good, it might be an issue with the server, or the site has been hacked. There's a lot of that going around lately.

            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
          • discuss.answer
            • 34127
            • 135 Posts
            This issue is not that xpdo.class.php doesn't exist, but a file being used by the PDO driver/MySQL server is inaccessible. Are you connecting to a local database server by any chance, using host "localhost"? If so, can you try changing "localhost" to "127.0.0.1"?
              • 52858
              • 8 Posts
              Quote from: wingnutty at Aug 14, 2018, 04:12 AM
              This issue is not that xpdo.class.php doesn't exist, but a file being used by the PDO driver/MySQL server is inaccessible. Are you connecting to a local database server by any chance, using host "localhost"? If so, can you try changing "localhost" to "127.0.0.1"?

              Changing 'localhost' to '127.0.0.1' for both 'database_server' and 'database_dsn' did the trick. Thank you both for your help!