freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Jan Simek <jsimek AT i-network.com>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: changing port (again)
- Date: Wed, 19 Sep 2001 15:14:16 -0400 (EDT)
Hm,
yes, looking at the man:
-----------------------------
int mssql_connect ([string servername [, string username [, string
password]]])
Returns: A positive MS SQL link identifier on success, or FALSE on error.
mssql_connect() establishes a connection to a MS SQL server. The
servername argument has to be a valid servername that is defined in the
'interfaces' file.
-----------------------------
This is the case, I have this line defined in interfaces
(/usr/local/freetds/interfaces):
serverx
query tcp tds4.2 smalldog 7433
as mentioned, I have smalldog in /etc/hosts (= 172.16.2.2) and I can
telnet to it (on port 7433).
Then when connecting with mssql-connect.php (as bellow), I keep getting
DB-LIbrary: Login incorrect.
How do I get more debugging/ verbose? What else to try?
Hm and I did try changing this:
mssql_connect ("serverx","usersql","passwd") or die ("No... sorry\n")
to this:
mssql_connect ("172.16.2.2,7443","usersql","passwd") or die ("No...
sorry\n")
but got the same results (bad).
Thanks all,
--Jan
P.S.: And yes, I did check that the username & passwd are correct... :-)
> I don't have php talking to mssql, but according to
the comments on > www.php.net, this is supposed to work
>
>
> >From http://www.php.net/manual/en/function.mssql-connect.php
>
>
> Connect to MS SQL 7.0 on anothe computer over TCP/IP:
>
> I connect to MS SQL if set hostname and port only:
>
> $hostname = "localhost,port";
>
> $username = "login";
> $password = "password";
> $dbName = "database";
>
> MSSQL_CONNECT($hostname,$username,$password)
>
> WORK FINE!
> -----Original Message-----
> From: bounce-freetds-134458 AT franklin.oit.unc.edu
> [mailto:bounce-freetds-134458 AT franklin.oit.unc.edu] On Behalf Of Jan
> Simek
> Sent: Wednesday, September 19, 2001 2:30 PM
> To: TDS Development Group
> Cc: horace AT i-manila.com.ph
> Subject: [freetds] Re: changing port (again)
>
> Hi all,
>
> > >no, everything from the internal network. Telnet to 1433 / 7433 works
> > >fine... i.e.: 1433 yes before change (and no 7433), and 1433 no after
> > >change (and 7433 yes).
> > >
> > >Anything else I should check for? I do not want to recompile
> everything
> > >(FreeTDS and PHP just for this...).
> > >
> > >??
> >
> > Not quite sure how you do it for PHP, but did you specify the new port
>
> > number? It defaults to 1433...
> > for the JDBC you should be using this for the connection string :
> > jdbc:freetds:sqlserver://servername:port/database
>
> I'm using PHP:
>
> mssql_connect ("serverx","usersql","passwd") or die ("No... sorry\n")
>
>
>
> serverx is defined in /etc/hosts (responds to pings, and telnet to 7433)
>
> in interfaces I have:
>
> serverx
> query tcp tds4.2 smalldog 7433
>
>
> Again, telnet to 7433 works fine...
>
> If I change it back (in the interface file to 1433 and change the port
> on
> the NT machine (MS SQL) back to 1433), it works just fine...
>
> So the PHP function mssql_connect doesn't know that I want it to connect
> to port 7433 instead of the deafult 1433...
>
> Any other ideas?
>
>
> Thanks,
>
> --Jan
>
>
>
>
>
> ---
> You are currently subscribed to freetds as: [doon AT inoc.net]
> To unsubscribe, forward this message to
> $subst('Email.Unsub')
>
>
> ---
> You are currently subscribed to freetds as: [jsimek AT i-network.com]
> To unsubscribe, forward this message to $subst('Email.Unsub')
>
-
Re: changing port (again),
Jan Simek, 09/19/2001
- <Possible follow-up(s)>
- Re: changing port (again), Steven J. Backus, 09/19/2001
- Re: changing port (again), Patrick Muldoon, 09/19/2001
- Re: changing port (again), Michael Peppler, 09/19/2001
- Re: changing port (again), Jan Simek, 09/19/2001
- Re: changing port (again), Horace Posadas, 09/19/2001
- Re: changing port (again), Darryl Friesen, 09/19/2001
- Re: changing port (again), Darryl Friesen, 09/19/2001
- Re: changing port (again), Brian Bruns, 09/19/2001
- Re: changing port (again), Brian Bruns, 09/19/2001
Archive powered by MHonArc 2.6.24.