WHM enable or install PDO driver

cpanelPHPwhm

how to enable or install pdo extansion for php , i cant use easyapache and i cant find php.ini in WHM

after install script on host i get this error:

 Fatal error: Class 'PDO' not found in /home/jafar/public_html/model/db.cls.php on line 29 

script dont have any problem and work correctly on localhost.i think if i can install or enable it can successfull run and install script.

Best Answer

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 save & Build on the bottom of the page.
Related Question