Laravel not working with MSSQL
-
Hello,
I have a problem integration laravel with mssql. A message appears to me
the driver can not be found (SQL: choose * from [users])I have configured php.ini appropriately, adding the amount
extension = sqlsrv_72_ts_x86Interestingly, the script was made outside laravel and displays data from the database.
So the php configuration is correct.
Thank you for suggestions and advice.
-
@Tomasz : Do you think it is a bug in Laravel? I think so.
-
It looks like it, it's a pity because I'm standing with the implementation of the project.
-
@Tomasz : You can debug to figure out or create another project that can connect to MSSQL and use it as API.
-
For Ms-Sql you need to install ODBC-Drivers as well. I was missing this step and searched the whole internet without luck.
-
As part of the test, I created a clean project with one controllere, view etc. and I also like the error
-
@Tomasz odbc drivers in place? https://docs.microsoft.com/de-de/sql/connect/php/system-requirements-for-the-php-sql-driver?view=sql-server-2017
-
Yes i change my connection on:
'odbc' => [
'driver' => 'sqlsrv',
'odbc' => true,
'odbc_datasource_name' => '{SQL Server}',
'host' => '{127.0.0.1\DB_TEST}',
'database' => 'meteor',
'username' => 'DESKTOP-B9M4O7M\admin',
'password' => 'secret', ],and connection work ok. Thank you.