Installing PDO_MYSQL PHP extension on CPanel?

后端 未结 3 917
眼角桃花
眼角桃花 2021-01-15 10:46

I recieved this error while installing Magento on a customer\'s server, \'PHP Extension \"pdo_mysql\" must be loaded\'. How would one go about installing/enabling this exten

相关标签:
3条回答
  • 2021-01-15 11:00

    I don't think you can do it in a shared host or with cPanel.

    Convince the webhost to install it for you.

    0 讨论(0)
  • 2021-01-15 11:06

    You can enable PDO in cPanel if you have cloudlinux installed. In cPanel search for PHP Version and on the resulting screen select and enable PDO and finally select save. * http://docs.cloudlinux.com/index.html?using_php_selector.html

    If you do not have CloudLinux and PhpSelector installed you will need an administrator account to install PDO through easyapache. In WHM follow this guide:

    Enabling PDO in Easyapache

    1. Log in to WHM ( http://domain.com/whm )
    2. Goto WHM »Software »EasyApache (Apache Update)
    3. Select "Previously Saved Config (** DEFAULT **)" and click "Start customizing based on profile"
    4. On the "Apache Version" page click "Next"
    5. On the "PHP Version" page click "Next"
    6. On the "Short Options List" page click"Exhaustive Options List"
    7. On the "Exhaustive Options List" ensure that PDO, PDO sqlite and PDO MySQL are selected.
    8. Then Click Build on the bottom of the page.

    PS. I note that you are on 11.24.5-STABLE. This is a extremely old version of WHM/cPanel. You should update your server as this version of cPAnel is no longer supported by cPanel.

    0 讨论(0)
  • 2021-01-15 11:14

    I'm using Magento CE 1.7, CentOS 6, and WHM 11.38, and here's what I did to resolve the 'PHP Extension "pdo_mysql" must be loaded' error I received during my Magento install:

    1. Open WHM and go to Home » Software » Easy Apache (Apache Update)
    2. Scroll to the bottom and select "Start customizing based on profile"
    3. Click "Next step" twice
    4. Scroll to the bottom and select "Exhaustive Options List"
    5. Select checkboxes for PDO and PDO MySQL, and rebuild Apache
    6. Go to Magento's root, copy php.ini.sample to php.ini
    7. Open the newly created php.ini file and add the following:

      extension=pdo.so
      extension=pdo_sqlite.so
      extension=sqlite.so
      extension=pdo_mysql.so

    This might be a good time to restart Apache using terminal (# service httpd restart). Hope that helps!

    0 讨论(0)
提交回复
热议问题