Skip to Content.
Sympa Menu

freetds - Re: [freetds] connection Linux -> MsSQL-2000 server works than does notwork anymore.

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Stefan Sonnenberg-Carstens" <ssc AT coolspot.de>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] connection Linux -> MsSQL-2000 server works than does notwork anymore.
  • Date: Mon, 19 Jan 2004 19:10:00 +0100

Check your cabling.
If your SQL Server responds so slow, that PHP
can't react, it's not a problem of freetds.


----- Original Message -----
From: "Alain Barthélemy" <cassandre AT bartydeux.be>
To: "freetds" <freetds AT lists.ibiblio.org>
Sent: Monday, January 19, 2004 3:52 PM
Subject: [freetds] connection Linux -> MsSQL-2000 server works than does
notwork anymore.


> Linux 2.4.19 (SuSE-8.1)
>
> Freetds:
>
> ./configure --prefix=/usr/local --with-tdsver=8.0 --enable-msdblib
>
> Apache - httpd-2.0.48:
>
> ./configure --prefix=/www --enable-so --enable-module=all
> --enable-mods-shared=all
>
> PHP-4.3.4:
>
> ./configure --with-apx2=/www/bin/apxs --with-config-file-path=/www/conf
> --with-mssql=/usr/local --enable-trans-sid --enable-sigchild --enable-msdb
lib
>
> The MsSQL server uses port 1533 (not default 1433)
>
> Till last friday. Everything worked well.
>
> Only problem /usr/local/etc/freetds.conf seemed to be there for
decoration. I tried to change lines in it like port = 1533 in [GLOBAL]
without success. Thus I had to type export TDSVER=8.0 and export
TDSPORT=1533.
>
> tsql -S 192.168.x.x -U MyAccount
>
> No problem I had 1>
>
> To connect, PHP script:
>
> <?php
>
> $myServer = "192.168.x.x";
> $myUser = "abarthel";
> $myPass = "xxxxxxxx";
> $myDb = "dBase";
>
> $conn = @mssql_connect($myServer, $myUser, $myPass) //// worked OK
> or die ("Could not connect to $dBase");
>
> $s = $mssql_select_db($myDb, $conn)
> or die ("Could not open dbase $myBd"); ///// worked OK
>
> $query = "select ....";
>
> $resultat = mssql_query($query); //// result OK
>
> Thus there was no problem.
>
> Today with the same configuration I have:
> Could not connect to dBase
>
> But the tsql command still works. Thus connection to MsSQL server is done.
>
> Only through a PHP script I can not connect.
>
> I suspect a slowness of the MsSQL server to respond or to, acknowledge.
Thus I
> suppose I have to repeat the connection request a certain number of time
> before success.
>
> My questions:
>
> 1) How to activate the freetds.conf script?
> 2) What could be the problem (tsql works but PHP mssql_connect() not)?
> 3) How to configure a repeatable connection request (something like
connect
> timeout=10 (or longer time))?
>
> Thanks for any help.
>
> --
> Alain Barthélemy
> cassandre AT bartydeux.be
> http://bartydeux.be
> Linux User #315631
> _______________________________________________
> 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