Support the ongoing development of Laravel.io →
Configuration Database

Environment: Windows 7 x64 WAMP with PHP 5.5 Laravel 4.2

php -ini returns:

C:>php --ini Configuration File (php.ini) Path: C:\Windows Loaded Configuration File: C:\wamp\bin\php\php5.5.12\php.ini Scan for additional .ini files in: (none) Additional .ini files parsed: (none)

phpinfo(); returns on browser: PDO drivers mysql, sqlite, sqlsrv

SQL Server works well with Laravel using apache so no problems there.... However, when I open a cmd window and I type: php -m

no pdo_sql driver is listed:

pcre PDO pdo_mysql pdo_sqlite Phar

so running migrations with artisan return the following: c:\www\brt>php artisan migrate

[PDOException] could not find driver

So basically, the drive is loaded for apache and is in my php.ini however, when I run php in the CLI the module isn't installed and artisan can't find the SQL Server driver....

Any help is appreciated on how to setup PHP CLI the same as the php for Apache.

Last updated 2 years ago.
0

I have quite an opposite situation. In my php.ini used by CLI I don't have PDO extension uncommented, but it's listed by php -m. Interesting.

0

Again, I keep solving my own problems.... Environment: Windows 7 x64 WAMP 2.5

Solution:

Wamp has two php.ini files c:\wamp\bin\apache\apache2.4.9\bin\php.ini applies to the apache server and all the modules loaded there will be usable in Apache.

The OTHER php.ini is located in the php directory, in my case: c:\wamp\bin\php\php5.5.12\php.ini This is the php.ini that is used in the CLI

If anyone else has the problem stated above. Here's why! :)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

ezequiels ezequiels Joined 20 Jan 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.