-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't open lib 'ODBC Driver 13 for SQL Server #526
Comments
Just found this and it fixed my issue.
|
root@PARRAARANGO:~# sudo apt install msodbcsql mssql-tools |
root@PARRAARANGO: |
sudo apt-get install msodbcsqlReading package lists... Done |
Oddly, I'm seeing this error whenever I try to run sqlsrv_connect even though I've followed all the instructions carefully for installing ODBC 17 (because I'm on Debian 9). I can use sqlcmd just fine to talk to the DB, but not PHP. I do notice that I have both PHP 7.1 and PHP 7.2 installed. Could the fact that I have two installs be fouling up something in the ODBC 17 installation process? Thanks. |
@elramus sqlcmd is part of mssql-tools, not the ODBC driver. Just to clarify, I assume you are using the msodbcsql and mssql-tools previews available on this page? Also, PHP installs have nothing to do with the ODBC driver install, so that is not the problem. If the error you are getting says that ODBC driver 13 cannot be found, you can add the Driver keyword to the connection string and specify version 17 as follows:
or in the connection options in your PHP script,
Please let us know if this fixes the problem. |
@mauricio0015 Please follow the instructions on the ODBC install page to install msodbcsql and mssql-tools. If you are using Debian 9 or Ubuntu 17.10, you may need to use the preview versions on this page instead, because their public repositories have not been updated. |
In my case on openSUSE I get the following error: I don't know why is trying to use Driver 13. I am testing on PHP 7.2.1 |
Thanks for the clarifications @david-puglielli. Yes, I got msodbcsql and mssql-tools through the instructions here. For some context, my end goal is to have Laravel framework in a LAMP environment talk to an MS SQL Server database. Found lots of conflicting info on how to get Laravel to talk to MS SQL, so I'm unclear on which PHP driver(s) I need: sqlsrv, pdo_sqlsrv, pdo_odbc, or pdo_dblib. I tried adding |
@elramus I think you may be using the stable version of the sqlsrv driver, which does not support ODBC driver 17. Could you try |
hi @david-puglielli, I stopped trying with Deb 9 to avoid dealing with ODBC 17 altogether. Tried a bunch of times with Ubuntu 16.04, but still ran into basically the same thing. Opened a new issue: #689. Thanks for your help with this. |
@david-puglielli Thanks. Changing the driver name worked. Thanks. |
Closing this issue due to inactivity. If any of you still have issues, please create a new issue. Thank you. |
Still encountering some issues. Having installed
|
DId you install ODBC 17 or ODBC 13, @willgdjones ? Which platform? Assuming you're looking for ODBC 13, please type
Check if |
This is on Mac OSX 10.3.1 |
It seems that the driver is installed on my system. |
hi @willgdjones , regrettably we don't support anything lower than Mac OS X 10.11 Even if it looks like ODBC 13 is installed, it may not work properly. |
Help im trying to connect from cpanel webhost to sql hosted in windows server, but having this problem SQLSTATE [01000] SQLDriverConnect: 0 [unixODBC] [Driver Manager] Can not open lib 'SQL Server': file not found |
@Dkeimerunthe You need to have the ODBC driver installed. Here is the link. |
Thanks david-puglielli, i am sorry im not good at this, but i already installed the Microsoft ODBC Driver 17 for sql server in my machine. but still encountering the same problem check my web olympusmuonline.com |
You guys might not have ODBC drive. Please install it first. sudo su -Download appropriate package for the OS version Ubuntu 14.04 Ubuntu 16.04 Ubuntu 18.04
optional: for bcp and sqlcmd
optional: for unixODBC development headers |
I just followed the setup to install php 7.1 drivers on my Mac but I'm having a few issues. I get two errors when I try to interact with the database.
The text was updated successfully, but these errors were encountered: