[freetds] PHP upgrade causes MSSQL connection to fail

Frank M. Kromann frank at kromann.info
Tue Dec 12 20:06:06 EST 2006


aaa.bbb.ccc.ddd should point to a valid section in yor freetdf.conf file.
Something like this:

[aaa.bbb.ccc.ddd]
	host = some_host.domain.com
	port = 1433
	tds version = 7.0
;	try domain login = yes
;	try server login = no
;	nt domain = MYDOMAIN


- Frank
> 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.
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
> 





More information about the FreeTDS mailing list