2017-08-07 22 views
0

私のMACにphp7.1用のmssqlドライバをインストールしましたPDOException:ドライバが見つかりません

私のmssql接続もチェックしました。

TDSVER=8.0 tsql -H yyy.yyy.yy.yy -U xx -D testphp -p 1433 -P xxx 
私は、私はまだ、このエラーが出るんexception.Whyを次取得

php artisan migrate:install 

を試してみてください今

?[1]私がインストールされているドライバおよびすべての

brew install msodbcsql 
brew install mssql-tools 
brew install autoconf 
sudo pear config-set php_ini `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` system 
sudo pecl install sqlsrv 
sudo pecl install pdo_sqlsrv 

{1]

[Illuminate\Database\QueryException]           
     could not find driver (SQL: create table "migrations" ("id" int identity pr 
     imary key not null, "migration" nvarchar(191) not null, "batch" int not nul 
     l))                   

     [PDOException]   
     could not find driver 

私はpdo_mssql dri ver私は以下のエントリーを見る。

/usr/include/php/ext/pdo/php_pdo_driver.h 
/usr/local/Cellar/php71/7.1.7_19/lib/php/.registry/.channel.pecl.php.net/pdo_sqlsrv.reg 
/usr/local/Cellar/php71/7.1.7_19/lib/php/doc/pdo_sqlsrv 

答えて

0

あなたの場所でのphpinfo()関数を使用して、一つのファイルを作成し、ドライバの接続はMSSQLのために有効になっているかどうか確認してください。

0

brew options php71を実行すると、--with-mssqlのようなオプションが表示されます。 brew install php71 --with-mssqlで再インストールしてください。

関連する問題