config.php
$dbc = mssql_connect($web['dbhost'], $web['dbuser'], $web['dbpassword']) or die("Couldn't connect to SQL Server!");
->
$dbc = mssql_connect($web['dbhost'], $web['dbuser'], $web['dbpassword']) or die("Couldn't connect to SQL Server! Error: " . mssql_get_last_message());