Re: Apache, PHP4, access problem to MS SQL 7.0

From: Date: Wed, 14 Feb 2001 17:38:22 +0000
Subject: Re: Apache, PHP4, access problem to MS SQL 7.0
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-6625@lists.php.net to get a copy of this message
> Can anybody help me about my serious problem to connect to MS SQL 7.0. I > tried to use the freetds-driver but i'm not able to connect with it. They > said that I must define the Serverconnection in the interfaces-file. I found > one in the freetds-directory but i don't know how to write it correct. I've > got a Linux-webserver and MS SQL runs on a WinNT4.0-Server. There should be a file called 'interfaces' in whatever directory you installed FreeTDS (our is in /usr/local/freetds). That file lists all the Sybase/MSSQL servers you can connect to. Ours looks like this: server1 query tcp tds4.2 128.233.x.y 1433 server2 query tcp tds7.0 128.233.x.y 1433 (substitute 128.233.x.y for the real IP numbers of your server). For a 'standard' install of MSSQL server the port number is 1433. Took me a while to find that. If you're using FreeTDS, the third parameter of the interfaces file can be the version of TDS protocol to use when talking to that server. Also, make sure you have the SYBASE environment variable set to the directory where FreeTDS is installed. I'd recommend trying sqsh (SQL command line shell for Sybase servers -- works with MSSQL as well) to test the connection. It assumes a full Sybase install, so the Makefile took a little tweaking in order to get it to compile, but once installed it will help you debug the connection problem, test your queries etc. Not sure of a download site, but if you search Google you're bound to find it. Hope that helps. - Darryl ---------------------------------------------------------------------- Darryl Friesen, B.Sc., Programmer/Analyst Darryl.Friesen@usask.ca Education & Research Technology Services, http://gollum.usask.ca/ Department of Computing Services, University of Saskatchewan ---------------------------------------------------------------------- "Go not to the Elves for counsel, for they will say both no and yes"

« previous php.db (#6625) next »