[freetds] PHP upgrade causes MSSQL connection to fail
Kardan Kal
kardankal at yahoo.com
Tue Dec 12 18:48:31 EST 2006
We recently upgraded from PHP 4.3.3 to PHP 5.2.0.
After the upgrade the database connections have started failing with a "mssql_connect() [function.mssql-connect]: Unable to connect to server" error.
The only way we can get it to work is by appending the port information to the db servers IP address.
<pre upgrade>
$host = "aaa.bbb.ccc.ddd";
$user = "abcabc";
$dbpassword = "xyzxyz";
$dbname = "mydb";
$conn = mssql_connect ($host, $user, $dbpassword) OR die("could not connect to database");
<post upgrade>
$host = "aaa.bbb.ccc.ddd:1433";
$user = "abcabc";
$dbpassword = "xyzxyz";
$dbname = "mydb";
$conn = mssql_connect ($host, $user, $dbpassword) OR die("could not connect to database");
My system administrators are convinced that the PHP code has to be changed whereever a db call is being made. I on the other hand think we are missing some config parameters.
What should we be checking? Any pointers.
My setup
Windows 2000 - MS SQL 2000
Linux 2.4.21 - PHP 5.2.0
Freetds version - $Id: freetds.conf,v 1.7 2002/10/17 15:11:02 castellano Exp $
---------------------------------
Any questions? Get answers on any topic at Yahoo! Answers. Try it now.
More information about the FreeTDS
mailing list