Web Development

When setting up a server application built in PHP, it is not uncommon for a few configurations not to be configured. One such problem is when the PDO extension hasn’t been enabled.

Option 1

First option is to check your php info if you have PDO extension enabled. If it is not, just put the following lines in php.ini file.

extension=pdo.so
extension=pdo_mysql.so

Try your application again. If it works, then hurray!

Option 2

You may not have PDO installed. A quick an easy way to install PDO especially when you are going to use MySQL, is to install php-mysql. This will install the dependency, php-pdo.

yum install php-mysql

Restart

All new configurations will not be set unless we restart the server:

service httpd restart

Profit!