Connecting to SQL Server using PHP

686
2
08-11-2016 08:59 AM
SarojThapa1
Occasional Contributor III


I have an instance of SQL Server platform in ArcGIS desktop. I want to connect to the SQLServer database using pdo class and my version of php is 7.0.8. Which ODBC driver will be good to install?

Thanks

Tags (2)
0 Kudos
2 Replies
QuinnFrancis
New Contributor III

Hi Saroj, 

What version of SQL Server are you running? The ODBC Driver 11 for SQL Server provides support for connecting to Microsoft SQL Server 2005, 2008, 2008R2, 2012, and 2014.  I suggest that you check that the SQL Server Native Client is installed on the machine running PHP as well.  This is a requirement for using the SQLSRV extension in PHP.

https://www.microsoft.com/en-us/download/details.aspx?id=36434   

Download Microsoft® SQL Server® 2012 Feature Pack from Official Microsoft Download Center 

PHP: Requirements - Manual 

You'll need to download Version 4.0 of the Microsoft Drivers for PHP for SQL Server.  Version 4.0 supports PHP 7.0+.

Download Microsoft Drivers for PHP for SQL Server from Official Microsoft Download Center 

Quinn

SarojThapa1
Occasional Contributor III

Thanks Quinn.

0 Kudos