Here's the code that I am using.
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
$myServer = "ip-address:1334/SQLEXPRESS";
$myUser = "username";
$myPass = "password";
$myDB = "dbname";
$link = mssql_connect($myServer, $myUser, $myPass);
if ( !$link ) {
if ( function_exists('error_get_last') ) {
var_dump(error_get_last());
}
die('connection failed');
}
?>
Now this code is running on a linux machine and the server is on a windows server. The IP is correct as well as username, password I created a new pair inside SQLEXPRESS. However, I still get a connection issue.
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server
the port 1334 is opened by our windows server and SQL server is listening to both 1334 and 1433. THey wont open default port for security reasons. They have double checked the settings but I still cannot connect.
What should be the next action for me.
Kind regards
Khuram