I am running php 5.5 on a Windows Server 2008. I am using the Laravel 4.0 framework for the application. I am connecting to a SQL SRV database via PDO, when executed via htt
php cli and php cgi use different php.ini files. Try php -i | grep pdo
to see if pdo is installed for your cli, see php -i | grep "Loaded Configuration File"
The answer above is correct, but just to clarify:
Open your console and execute:
php -i | grep "Loaded Configuration File"
That will give you the folder directory where you php-cli.ini is (Laravel Commands use a different php.ini than the one used by HTTP requests)
Go to that file, and make sure it has this:
extension=php_pdo_mysql.dll
Restart your server and try again. That worked for me, hope it helps.