Pdo ( Portable Data Object ) needs to be installed if it is not done before. For windows platform goto control panel > Add remove program ( or Programs and features ) > Select your PHP installation and click Change. If you are installing PHP fresh then in the setup wizard you can select PDO from Extensions link.
PHP Data Object PDO installation or enable and creating connection string to manage MySQL database
Based on the database type you can enable or disable PDO drivers. Note that once you have done this process then automatically php.ini file gets edited and you may have to reboot your system. Note that PDO drivers are in your extension directory and in php.ini file this it to be enabled.
But in PHP 5.3 and above these dll are not required.
After installing pdo you can check your phpinfo function and ensure that PDO support is enabled.
Checking PDO Installation
You can get all the PDO drivers installed in your system by using getAvailableDrivers() function. We will get an array with a list of drivers installed. Here is the code.
We can check by using in_array function about any particular driver installed or not.
echo " You have PDO for MySQL driver installed ";
echo "PDO driver for MySQL is not installed in your system";