|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #74754 SQL Server Driver String Not Up to Date
Submitted: 2017-06-13 17:00 UTC Modified: 2017-06-29 00:20 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: henry at dotrose dot com Assigned:
Status: Open Package: ODBC related
PHP Version: 7.0.20 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
39 - 21 = ?
Subscribe to this entry?

 [2017-06-13 17:00 UTC] henry at dotrose dot com
From manual page:
In the "Example #1 DSN-less connections" portion of the documentation, it says:

// Microsoft SQL Server using the SQL Native Client 10.0 ODBC Driver - allows connection to SQL 7, 2000, 2005 and 2008
$connection = odbc_connect("Driver={SQL Server Native Client 10.0};Server=$server;Database=$database;", $user, $password);

This does not work with recent installations of unixODBC. It returns a unixODBC error message saying Driver Manager "cannot open lib 'SQL Server Native Client 10.0' : file not found".

Rather than changing the Driver string, however, I suggest adding something that helps the user find the correct current value. By looking in /etc/odbcinst.ini, I was able to find the correct value for my installation, which is "ODBC Driver 13 for SQL Server". I don't know where the relevant string would be on a Windows or Mac system, but I suspect someone does.


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-06-29 00:20 UTC]
-Package: Documentation problem +Package: ODBC related
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 18 02:01:29 2024 UTC