Good evening, I'm developing a PHP application using SQL Server but I'm not able to connect to the database. I already downloaded the driver, I already put the dlls in the PHP ini, I already downloaded the ODBC, I already directed the folder in the ini, already tried several encodings and all result in this same error. I have a short deadline and I can not connect, could someone kindly help me?
I'm using SQL2012, SQLSRV Driver PHP 43 with xampp, PHP 7.1.9
This is the code:
<?php
// Dados do banco
$dbhost = "nomedomeuddns.ddns.net\INSTANCIA,8091"; #Nome do host
$db = "IntegracaoDB"; #Nome do banco de dados
$user = "sa"; #Nome do usuário
$password = "Senha123"; #Senha do usuário
$conninfo = array("Database" => $db, "UID" => $user, "PWD" => $password);
$conn = sqlsrv_connect($dbhost, $conninfo);
?>