i’m migrating a windows server 2003 (32-bit) with php 5.3.8 to windows server 2008 R2 (64-bit).
we have an SQL Server 2000 (32-bit).
we have some intranet sites that connect to the SQL server via php. this all works fine on server 2003 IIS.
having set up the 2008 R2 server with the same version of PHP and the same extensions enabled we get an error.
(PHP 5.3.8 installed (php-5.3.8-nts-Win32-VC9-x86.msi)
“extension=php_pdo_sqlsrv_53_nts_vc9.dll” and “extension=php_sqlsrv_53_nts_vc9.dll” enabled in php.ini (and the dll files placed in in the “ext” folder).
php.php loads find and shows php is running
the method we use to connect to the SQL server is
$conn = sqlsrv_connect( $serverName, $connectionInfo );
the error we get is
Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -49 [code] => -49 [2] => 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] => 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 ( [0] => IM002 [SQLSTATE] => IM002 [1] => 0 [code] => 0 [2] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified [message] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified ) )
The error suggests i need to install the ODBC driver, so i downloaded and installed both “Microsoft ODBC Driver 11 for SQL Server” and “Microsoft ODBC Driver 13 for SQL Server”. I could only install the 64-bit versions of both of those. Rebooted, tried again and still the same error.
I’m at a loss as to what else is required to make this work.
Can anyone suggest what I need to do to get this to work?