March 15

How To Install and Enable PDO For cPanel, WHM

0  comments

PHP Data Objects ( PDO ) is a PHP extension that provides a consistent way of interacting with databases. To use PDO, you’ll need PHP 5, and PDO has to be installed and enabled, or you’ll get an error like this: “Fatal error: Class ‘PDO’ not found in…”

To check whether PDO is even installed, run this code on your server:

if ( extension_loaded(‘pdo’) ) {
echo “PDO is installed.”;
} else {
echo “PDO is NOT installed.”;
}

To install PDO in WHM servers, you’ll need a SSH terminal. Then, run the following 2 lines:

pecl install pdo
pecl install pdo_mysql

Once installed, you might need to add the following in a php.ini file in your web hosting account:

extension=pdo.so
extension=pdo_mysql.so

That’s it.


Other posts about scaling up businesses

I Only Own One Pair Of Shoes

Leave a Reply

Your email address will not be published. Required fields are marked

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Super Scale Your Business Today

Get on a personal call with me so that you can Super Scale your business now

__CONFIG_colors_palette__{"active_palette":0,"config":{"colors":{"62516":{"name":"Main Accent","parent":-1}},"gradients":[]},"palettes":[{"name":"Default Palette","value":{"colors":{"62516":{"val":"var(--tcb-skin-color-0)"}},"gradients":[]}}]}__CONFIG_colors_palette__
Super Scale Your Business Now