dottomm -2 Junior Poster in Training

Hello everybody and thank you in advance for taking the time to read this.
I am having trouble connecting to a remote MSSQL server from our web page server using the SQLSRV Connect.

I have installed all the necessary php extensions and sql drivers, and they all appear as they should on my phpinfo page.


I can successfully connect to the SQL server with the ODBC Data Source Administrator using my username and password, however when I connect with my php script. i receive an error in my mssql log that the password is incorrect. How can this be?
Here is the code I'm using;

/* Connect using SQL Authentication. */

$serverName = "myipaddress here";

  	$uid = "myusername";
  	$pwd = "mypassword";
  	
	$connectionInfo = array('UID' => $uid,
			'PWD' => $pwd,
		'Database' => 'nameofdatabase', "ReturnDatesAsStrings" => true);    								
   				
	$conn = sqlsrv_connect($serverName, $connectionInfo);
 		if( $conn === false )

			  { echo "not connected";
				 die( print_r( sqlsrv_errors(), true));
			  }
		else
			  { }

I have used this script successfully on a windows server previously, however it is not working on our new development server. Does anybody have any idea where the problem lies?

Thanks in advance for any help you can provide.