whiteboikyle Posted June 23, 2014 Share Posted June 23, 2014 I'm running: Windows Server 2003 IIS 6.0 Microsoft SQL 2005 PHP 5.3.28 Everything that i have read says, "5.3 got rid of mssql and now uses sqlsrv" so i added extension=php_sqlsrv_53_nts_vc9.dll to my php.ini (and yes it is in the ext folder) and when i run the script $serverName = "localhost\phonebook"; //serverName\instanceName // Since UID and PWD are not specified in the $connectionInfo array, // The connection will be attempted using Windows Authentication. $connectionInfo = array( "Database"=>"XXXXX", "UID"=>"XXXXX", "PWD"=>'XXXXXXXX'); $conn = sqlsrv_connect( $serverName, $connectionInfo); if( $conn ) { echo "Connection established.<br />"; }else{ echo "Connection could not be established.<br />"; die( print_r( sqlsrv_errors(), true)); } i get Connection could not be established.Array ( [0] => Array ( [0] => IMSSP [sqlSTATE] => IMSSP [1] => -49 => -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 ) ) What can i do to fix this? I assume use an older .dll? Quote Link to comment https://forums.phpfreaks.com/topic/289254-mssql-vs-sqlsrv-php-5328/ Share on other sites More sharing options...
kicken Posted June 23, 2014 Share Posted June 23, 2014 (edited) You need to do as the error message tells you. Go to http://go.microsoft.com/fwlink/?LinkId=163712 and download then install the Microsoft SQL Server 2008 R2 Native Client package. It is required for the sqlsrv driver to function. Edited June 23, 2014 by kicken Quote Link to comment https://forums.phpfreaks.com/topic/289254-mssql-vs-sqlsrv-php-5328/#findComment-1483078 Share on other sites More sharing options...
whiteboikyle Posted June 24, 2014 Author Share Posted June 24, 2014 You need to do as the error message tells you. Go to http://go.microsoft.com/fwlink/?LinkId=163712 and download then install the Microsoft SQL Server 2008 R2 Native Client package. It is required for the sqlsrv driver to function. Why would I do that when I am running server 2003? Quote Link to comment https://forums.phpfreaks.com/topic/289254-mssql-vs-sqlsrv-php-5328/#findComment-1483117 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.