Hi, I have a website and already set the TCP/IP on the server but still I can't make it connect the website on the server.
I tried this methods:
define('ODBC_USER', 'sa'); //
define('ODBC_PASS', 'SQLPASSWORD'); //
$odbc_connect = odbc_connect('DRIVER={SQL Server};SERVER=SERVERIP,1433', ODBC_USER, ODBC_PASS);
define('ODBC_USER', ''); //
define('ODBC_PASS', ''); //
$odbc_connect = odbc_connect('DRIVER={SQL Server};SERVER=SERVERIP,1433', ODBC_USER, ODBC_PASS);
define('ODBC_USER', 'sa'); //
define('ODBC_PASS', 'SQLPASSWORD'); //
$odbc_connect = odbc_connect('DRIVER={SQL Server};SERVER=SERVERNAME\SQLEXPRESS', ODBC_USER, ODBC_PASS);
define('ODBC_USER', ''); //
define('ODBC_PASS', ''); //
$odbc_connect = odbc_connect('DRIVER={SQL Server};SERVER=SERVERNAME\SQLEXPRESS', ODBC_USER, ODBC_PASS);
But nothing worked.
Any suggestions on how to make it work?
The error I got is this:
[19-May-2020 17:58:52 Asia/Manila] PHP Warning: odbc_connect(): SQL error: [unixODBC][FreeTDS][SQL Server]Unable to connect to data source, SQL state S1000 in SQLConnect in /home/***/public_html/includes/xinc_config.php on line 17
[19-May-2020 17:58:52 Asia/Manila] PHP Warning: odbc_exec() expects parameter 1 to be resource, bool given in /home/***/public_html/index.php on line 30
[19-May-2020 17:58:52 Asia/Manila] PHP Warning: odbc_result() expects parameter 1 to be resource, null given in /home/***/public_html/index.php on line 32