As mentioned by ManojGeek, PDO
can only be enabled in WHM
(usually provided/installed by default by the hosting company if you use for example a VPS
). If you used shared hosting, simply contact them to enable it.
However once you have access to WHM
, follow these steps:
Step One: In WHM search for "EasyApache (Apache Update)".
Step Two: Leave Profile "Default" and scroll to the bottom and click "Build Profile".
Step Three: Select Apache version (best to leave on default) -> Click next.
Step Four: Select a version PHP 5.X (5.5 recommended) -> Click next.
Step Five: Scroll to the bottom and click "Exhaustive Options List".
Step Six: Find PDO and PDO_mySQL and tick checkboxes ->Click "Save and Build".
Important: Do NOT close browser while config running. (takes about 2-5 minutes)
<?php if (class_exists('PDO')) { echo "installed"; } else { echo "not installed"; }
to make sure it is really not installed ? Or if you use<?php phpinfo();
and search forpdo_mysql
orPDO drivers
– Elysian