I tried to connect from php to SQLSERVER2012 on my ISP's server:
Any Ideas?
Thanks,
Milt
<?PHP
dl('c:\ppht\php_sqlsrv_53_ts.dll'); $hostname = "dba2012.db.2818339.hostedresource.com";
$username=$database = "dba2012";
$password = "Sx3edc4rfv!";
$connectionInfo = array( "Database"=>"dba2012"); //Connecting to database
try {
$connect=sqlsrv_connect($hostname,$connectionInfo);
if($connect==false) {
echo "Could not connect.\n";
die(print_r(sqlsrv_errors(),true));
}
} catch (Exception $e) { echo "e->getMessage()=$e->getMessage()"; }
?>
And got the following warning:
Could not connect.
Array (
[0] => Array
(
[0] => IMSSP
[SQLSTATE] => IMSSP
[1] => -49
[code] => -49
[2] => This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712
[message] => This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 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
)
)
miltonkbenjamin