We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48692
    • 3 Posts
    First, let me say I've never migrated a website from one server to another before. So, this is all new to me. But, I recently moved our website from a shared hosting server to a VPS on GoDaddy. I moved the web files over, created a new database and imported the database files, updated the configuration files per the MODX documentation on "Moving Your Site to a New Server", and also installed the EasyApache PHP files (including PDO_mysql) via the WHM Cpanel. I keep getting the following error message when I try to access the website on the new server:

    Fatal error: Class 'PDO' not found in /home/startfar/public_html/core/xpdo/om/xpdoquery.class.php on line 754

    When I searched the web for this error there are notes about "enabling the PDO" by inserting code which I've done. I tried inserting code into the php.ini file and the phpinfo.php file but nothing seems to work. I have no idea what to do to fix this problem and get the site to show up. Any help is appreciated. Again, I have no experience doing this so please respond like you're talking to a newbie, lol. Thanks.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Check a phpinfo() display to make sure the PDO and the mysql PDO drivers are enabled.

      http://www.inmotionhosting.com/support/website/php/create-phpinfo-page-to-see-php-settings
        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
        • 48692
        • 3 Posts
        Please let me know if you get this reply sottwell... I've tried replying twice to your post but it isn't showing up for some reason in the thread.

        I ran the phpinfo() display and the PDO modules you showed in your screenshot are not visible at all. I'm assuming the drivers aren't installed? I installed them using EasyApache, but I'm guessing it didn't work correctly. How can I go about getting the PDO drivers to show in phpinfo() display? I'm assuming this is my issue.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Check the phpinfo() display near the top and see where the php.ini files that are being used are. There are often a number of php.ini files scattered around, but the only ones that matter are the ones that are actually being used.

          As far as how to enable PDO and the MySQL PDO drivers, that varies depending on your server. You should talk to your hosting provider.
            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