Skip to Content.
Sympa Menu

freetds - Re: [freetds] PHP upgrade causes MSSQL connection to fail

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Chris Thomas <cwthomas AT llu.edu>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] PHP upgrade causes MSSQL connection to fail
  • Date: Tue, 12 Dec 2006 16:58:17 -0800

Make sure the mssql extension is loaded with your new version of php.
You can check by using phpinfo() .

On Tue, 2006-12-12 at 15:48 -0800, Kardan Kal wrote:

> 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




Archive powered by MHonArc 2.6.24.

Top of Page