Skip to Content.
Sympa Menu

freetds - Re: changing port (again)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Patrick Muldoon" <doon AT inoc.net>
  • To: "'TDS Development Group'" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: changing port (again)
  • Date: Wed, 19 Sep 2001 15:19:53 -0400


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!


YMMV,

Doon

-----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')





Archive powered by MHonArc 2.6.24.

Top of Page