I'm trying to connect to a remote sql server from an azure test site using this connection string.
try{$db = new PDO('sqlsrv:server=[ip],1433; database=[dbname]', $username, $password);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); }
catch(PDOException $e){
echo $e->getMessage(); }
The error message I get is this:
SQLSTATE[08001]: [Microsoft][SQL Server Native Client 11.0]TCP Provider: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Any ideas/leads about what I may be doing incorrectly? ANy help would be appreciated.
Sandeep.