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.
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.
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! :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community