I'm looking for solution for 2 days already. I'm getting following effect:
array(2) {
[0] => array(6) {
[0] => string(5) "IMSSP"
["SQLSTATE"] => string(5) "IMSSP"
[1] => int(-49)
["code"] => int(-49)
[2] => string(390) "This extension requires either the Microsoft SQL Server 2008 Native Client (SP1 or later) or the Microsoft SQL Server 2008 R2 Native Client ODBC Driver to communicate with SQL Server. Neither of those ODBC Drivers are currently installed. Access the following URL to download the Microsoft SQL Server 2008 R2 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712"
["message"] => string(390) "This extension requires either the Microsoft SQL Server 2008 Native Client (SP1 or later) or the Microsoft SQL Server 2008 R2 Native Client ODBC Driver to communicate with SQL Server. Neither of those ODBC Drivers are currently installed. Access the following URL to download the Microsoft SQL Server 2008 R2 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712"
}
[1] => array(6) {
[0] => string(5) "IM002"
["SQLSTATE"] => string(5) "IM002"
[1] => int(0)
["code"] => int(0)
[2] => string(91) "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
["message"] => string(91) "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
}
}
Looks like there's no "Microsoft SQL Server 2008 R2 Native Client" but there is!
I've already used same configuration on my local machine and test server. I was getting same error on local machine when there was no "Microsoft SQL Server 2008 R2 Native Client" installed. After installing it the problem was solved.
Unfortunatelly here I can't see any change.
I was trying different PHP and sqlsrv drivers but that had no effect.
I can't experinemt a lot because this is live server.
How can I make this working? Is this have something to do with control panel ODBC settings? There's also another native client installed but I can't remove it from this live server.
How to read this information? Does php sqlsrv driver sees native client at all?
Edit
The problem is that I'm using everything in 32 bit. Native driver is also shown in ODBC control panel. Sqlsrv extension for PHP is also working as shown in phpinfo.
How is that possible that sqlsrv extension for PHP doesn't "see" that native client?
I'm powerless and now I'm setting up VM where I'll set exactly the same cofiguration as on web server and will make some bolder experiments.
Install 32 and 64 bit drivers on the server. The 32 bit odbc control panel is located in the Windows\SysWow64 directory - not totally obvious, but that's it. Make sure you have drivers for your executable (PHP) - if it's 32 bit, you need 32 bit drivers.