We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40503
    • 8 Posts
    Hi guys,
    this is the error I can't seem to figure out..
    Fatal error: Class 'xPDODriver_' not found in /home/www/cms/modx/core/xpdo/xpdo.class.php on line 1821 I have installed pdo_mysql (5.5.24) and pdo_sqlite (3.7.13) all my php.ini settings appear to be correct:
    exension=pdo.so
    extension=pdo_sqlite.so
    extension=sqlite.so

    I have deleted the directory and tried reuploading and chmoding everything to 775, didn't change anything. Please help Wordpress is so freaking slow and I really want modx to work.



    the advanced install and command line installs have the same issues. Also I have verified that this code does work:
    /* Connect to an ODBC database using driver invocation */
    $dsn = 'mysql:dbname=...;host=localhost';
    $user = '...';
    $password = '...';
      
    try {
      $dbh = new PDO($dsn, $user, $password);
    } catch (PDOException $e) {
      echo 'Connection failed: ' . $e->getMessage();
    }




    it only says xPDODriver_ because for whatever reason it's not reading the db type, I updated the following function to default to mysql and now the error goes away and the error changes to "500 error site temporarily unavailable" (and the error log reports nothing)
    public function getDriver() {
            if ($this->driver === null || !$this->driver instanceof xPDODriver) {
                $_type = $this->config['dbtype'];
                if ( empty($_type) ) $_type = "mysql";
                $loaded= include_once(XPDO_CORE_PATH . 'om/' . $_type . '/xpdodriver.class.php');
                if ($loaded) {
                    $driverClass = 'xPDODriver_' . $_type;
                    $this->driver= new $driverClass($this);
                }
                if (!$this->driver) {
                    $this->log(xPDO::LOG_LEVEL_ERROR, "Could not load xPDODriver class for the {$_type} PDO driver. " . print_r($this->config, true));
                }
            }
            return $this->driver;
        }

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

      • 40503
      • 8 Posts
      This is a fresh install of 2.2.4-pl
      I also tried nightly

      All of the FTP files are OK, I have deleted them and reuploaded to verify

      My PDO MySQL is verified working


      PLEASE HELP!!
        • 41871
        • 3 Posts
        I am getting the same error, after installation completed, and after I fixed an error in core/config/config.inc.php:

        $config_options = {config_options}; to $config_options = '{config_options}';
        $driver_options = {driver_options}; to $driver_options = '{driver_options}';

        Now I get:
        Fatal error: Class 'xPDODriver_' not found in C:\xampp\htdocs\cms\modx\sitename\core\xpdo\xpdo.class.php on line 1823

        I'm using Modx 2.2.5 on a XAMPP local server, got all of the green check marks during installation. There was no FTP involved, just unzipped into the htdocs directory. It seems really strange to find syntax errors in a configuration program, and the same error was reported in version 2.2.1. Do I have the wrong version loaded?
        • discuss.answer
          • 22303 MODX Staff
          • 10,725 Posts
          I would start setup from scratch again. Those in the config file should not still be there after a successful installation and indicates something went wrong. There may be logs corresponding to the setup execution in your core/cache/logs directory that could have clues to what went wrong.
            • 41871
            • 3 Posts
            I did all that, and it worked, without a hitch! Strange it seems like I did everything exactly as I did the first time. OK, now I can finally get started. Thanks, opengeek!
              • 17412
              • 270 Posts
              I'm also getting this error a few times recently.

              MODx revo 2.2.7 pl
              PHP: 5.2.17
              MYSQL: 5.0.95

              Apache log: PHP Fatal error: Class 'xPDODriver_' not found in xpdo.class.php on line 1825

              PDO drivers are installed (see screenshot).

              During setup, when clicking "Test database server connection and view collations." some of the info is blank. (see screenshot)

              Any ideas what may be the issue here?
                • 17412
                • 270 Posts
                Further detail from Apache log:

                Trying to get property of non-object in /httpdocs/core/xpdo/xpdo.class.php on line 337
                PHP Warning: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array in /httpdocs/core/xpdo/xpdo.class.php on line 337
                PHP Fatal error: Class 'xPDODriver_' not found in /httpdocs/core/xpdo/xpdo.class.php on line 1825,
                PHP Parse error: syntax error, unexpected '{' in /httpdocs/core/config/config.inc.php on line 13 
                  • 22303 MODX Staff
                  • 10,725 Posts
                  Your config file was not properly written by the installation. I would recommend reinstalling.
                    • 17412
                    • 270 Posts
                    Yep thing is though, it's happened now a good few times. Each time I end up manually editing config directly and the sites work after this. There are no FTP transfer errors etc to report. Just thought to report this in case there may be some server configurations that conflict with current Revo version.
                      • 9207 ☆ A M B ☆
                      • 2,475 Posts
                      I wrote a utility script that helps detect problems with the installation/configuration. Take a look at the test_config.php script available at https://github.com/craftsmancoding/modx_utils