Skip to Content.
Sympa Menu

freetds - [freetds] tsql cant connect to ms-sql server

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Gosia.Rainer AT t-online.de (Rainer Spittel)
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] tsql cant connect to ms-sql server
  • Date: Mon, 29 Dec 2003 15:11:39 +0100

Hi,

I want to connect a MS-SQL Server 7.0 with PHP. The client, which is
accessing the SQL server is a redhat linux system. I have installed Apache,
PHPH4.3.3 and Freetds-0.61.2. The configuration of FreeTDS is:

./configure --prefix=/usr/local/freetds --enable-msdblib
--with-tdsver=7.0 --enable-dbmfix

and later I have installed php with:

./configure --enable-shared --with-regex=system --with-jpeg-dir=/usr
--with-png-dir=/usr --with-zlib --with-gd --with-freetype-dir=/usr
--enable-force-cgi-redirect --enable-dbase --with-pdflib --with-mysql
--with-config-file-path=/usr/local/php433/ --prefix=/usr/local/php433
--with-mssql=/usr/local/freetds

After creating a php-script to test the connection with mssql_connect I
receive this php-error:

Warning: mssql_connect(): Unable to connect to server: 192.168.6.2
in /var/www/html/test/database_inc.php on line 130

I have tested the same php-script on a second web-server (MS-Windows
with php 4.3.2) and I am able to build up the connection to the server. So I
tried to connect to the MS-SQL Server using TSQL to test the connection:

[root@pc03 php-4.3.3]# tsql -H 192.168.6.2 -U sa -P [myPassword] -p
1433
locale is "de_DE.UTF-8"
charset is "UTF-8"
src/tds/login.c: tds_connect: 192.168.6.2:1433: Verbindungsaufbau
abgelehnt [connection refused]
Msg 20009, Level 9, State 0, Server OpenClient, Line 0
Server is unavailable or does not exist.
There was a problem connecting to the server
[root@pc03 php-4.3.3]#

Does anyone can give me an advice? I am not able to get to the server,
starting at the linux system.

HELP !!!! ;-)
Rainer
--------------------------------------------------------------------------
Reply message: mailto:Gosia.Rainer AT t-online.de






Archive powered by MHonArc 2.6.24.

Top of Page