Skip to Content.
Sympa Menu

freetds - RE: [freetds] mssql_connect fails using PHP4.3.3, freetds-0.61.2

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] mssql_connect fails using PHP4.3.3, freetds-0.61.2
  • Date: Tue, 9 Sep 2003 14:16:36 +0100

Sam,

Sybase open client uses a file called 'interfaces' . their documentation is
using that as a generic term I think...

a possibility (seeing as I don't know PHP) - is $DSQUERY set to "SYBASE" and
providing an override perhaps ?

a possible solution - well a cheat for the time being - duplicate your
STJAMES entry as SYBASE in the freetds.conf file ...


bill

> -----Original Message-----
> From: Samuel Luxford-Watts [SMTP:slwatts AT winckworths.co.uk]
> Sent: 09 September 2003 14:13
> To: 'FreeTDS Development Group'
> Subject: RE: [freetds] mssql_connect fails using PHP4.3.3,
> freetds-0.61.2
>
> Hmm...
>
> 1. yes this is correct
>
> 2. oh - why? I effectively use mssql_connect("STJames","sa","secret"); so
> surely this is telling php to connect to STJames? Or am I missing
> something?
> Other than the actual script is there anywhere else that PHP may be
> getting
> the server name from?
>
> Something that is really odd is that the PHP documentation doesn't really
> match up with the freetds docs. PHP manual says this of mssql_connect:
>
> >>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.
>
> What interfaces file?!!
>
> Thanks again for the help!
>
> Sam
>
>
> -----Original Message-----
> From: Thompson, Bill D (London) [mailto:bill_d_thompson AT ml.com]
> Sent: 09 September 2003 13:56
> To: 'FreeTDS Development Group'
> Subject: RE: [freetds] mssql_connect fails using PHP4.3.3, freetds-0.61.2
>
>
> OK this tells us two things:
>
> 1) we are looking in freetds.conf file in /etc/freetds/freetds.conf - is
> this correct ?
>
> 2) when you go through PHP etc. (as opposed to using tsql ) we are not
> trying to connect to server STJAMES, but server SYBASE !
> I assume this is being set somewhere external to freetds.
> We don't find server SYBASE anywhere in the freetds.conf, and never
> make
> a connection....
>
>
> Bill
>
> > -----Original Message-----
> > From: Samuel Luxford-Watts [SMTP:slwatts AT winckworths.co.uk]
> > Sent: 09 September 2003 13:44
> > To: 'FreeTDS Development Group'
> > Subject: RE: [freetds] mssql_connect fails using PHP4.3.3,
> > freetds-0.61.2
> >
> > Ok - the outputs are below - hope it helps!
> >
> > Thanks
> >
> > Sam
> >
> > /tmp/freetds.log:
> > Starting log file for FreeTDS 0.61.2 with debug level 99. 2003-09-08
> > 22:51:24.695138 iconv will convert client-side data to the "" charact
> > er set
> > 2003-09-08 22:51:24.695183 IP address pointer is NULL
> > 2003-09-08 22:51:24.695197 Server SYBASE not found!
> >
> > /tmp/freetdsconfig.log
> > linux:/etc/freetds # more /tmp/freetdsconf.log
> > Starting log file for FreeTDS 0.61.2 with debug level 99.
> > 2003-09-08 22:51:24.684026 Attempting to read conf files.
> > 2003-09-08 22:51:24.684055 ...$FREETDSCONF not set. Trying $HOME.
> > 2003-09-08 22:51:24.684777 Found conf file '/etc/freetds/freetds.conf'
> > (default)
> > . Reading section 'SYBASE'.
> > 2003-09-08 22:51:24.684825 Looking for section global.
> > 2003-09-08 22:51:24.684920 ... Found section global.
> > 2003-09-08 22:51:24.684936 Got a match.
> > 2003-09-08 22:51:24.684950 option = 'tds version' value = '7.0'.
> > 2003-09-08 22:51:24.684967 option = 'swap broken dates' value = 'no'.
> > 2003-09-08 22:51:24.684980 no is a 'no/off/false'.
> > 2003-09-08 22:51:24.684995 option = 'swap broken money' value = 'no'.
> > 2003-09-08 22:51:24.685008 no is a 'no/off/false'.
> > 2003-09-08 22:51:24.685023 option = 'try server login' value = 'yes'.
> > 2003-09-08 22:51:24.685037 yes is a 'yes/on/true'.
> > 2003-09-08 22:51:24.685051 option = 'try domain login' value = 'no'.
> > 2003-09-08 22:51:24.685064 no is a 'no/off/false'.
> > 2003-09-08 22:51:24.685079 option = 'nt domain' value = 'wwp-s'.
> > 2003-09-08 22:51:24.685095 option = 'cross domain login' value = 'no'.
> > 2003-09-08 22:51:24.685108 no is a 'no/off/false'.
> > 2003-09-08 22:51:24.685123 option = 'dump file' value =
> > '/tmp/freetds.log'.
> > 2003-09-08 22:51:24.685139 option = 'debug level' value = '10'.
> > 2003-09-08 22:51:24.685157 option = 'text size' value = '64512'.
> > 2003-09-08 22:51:24.685174 ... Found section jdbc.
> > 2003-09-08 22:51:24.685191 ... Found section jdbc_42.
> > 2003-09-08 22:51:24.685208 ... Found section mypool.
> > 2003-09-08 22:51:24.685225 ... Found section stjames.
> > 2003-09-08 22:51:24.685361 Looking for section sybase.
> > 2003-09-08 22:51:24.685400 ... Found section global.
> > 2003-09-08 22:51:24.685429 ... Found section jdbc.
> > 2003-09-08 22:51:24.685446 ... Found section jdbc_42.
> > 2003-09-08 22:51:24.685463 ... Found section mypool.
> > 2003-09-08 22:51:24.685479 ... Found section stjames.
> > 2003-09-08 22:51:24.685501 ...'SYBASE' not found.
> > 2003-09-08 22:51:24.685558 Failed in reading conf file. Trying
> interface
> > files.
> > 2003-09-08 22:51:24.685577 Looking for server....
> > 2003-09-08 22:51:24.685948 Looking for server in
> > /var/lib/nobody/.interfaces.
> > 2003-09-08 22:51:24.685977 Searching interfaces file
> > //var/lib/nobody/.interface
> > s.
> > 2003-09-08 22:51:24.686012 Couldn't open /var/lib/nobody/.interfaces.
> > 2003-09-08 22:51:24.686028 Looking for server in
> /etc/freetds/interfaces.
> > 2003-09-08 22:51:24.686042 Searching interfaces file
> > /etc/freetds/interfaces.
> > 2003-09-08 22:51:24.686064 Couldn't open /etc/freetds/interfaces.
> > 2003-09-08 22:51:24.686078 Setting 'tmp_port' to 4000 as a guess.
> > 2003-09-08 22:51:24.694632 Setting 'dump_file' to '/tmp/freetds.log'
> from
> > $TDSDU
> > MP.
> >
> > -----Original Message-----
> > From: Thompson, Bill D (London) [mailto:bill_d_thompson AT ml.com]
> > Sent: 09 September 2003 13:28
> > To: 'FreeTDS Development Group'
> > Subject: RE: [freetds] mssql_connect fails using PHP4.3.3,
> freetds-0.61.2
> >
> >
> > Hi Samuel,
> >
> > Lets see what's going on in a bit more detail.
> >
> > First step might be to see what's going on behind the scenes with the
> > freetds config.
> >
> > If you set environment variable TDSDUMPCONFIG to point to a file
> > (different from the TDSDUMP file) then we should be able to see how
> > freetds is resolving your request to connect to your server.
> >
> > Try that and post the output.
> >
> >
> > --------------
> > Winckworth Sherwood Solicitors and Parliamentary Agents
> > DX 148400 WESTMINSTER 5 : 35 Great Peter Street, London SW1P 3LR
> > Telephone 020 7593 5000 Fax 020 7593 5099
> >
> > Do something amazing!
> > The firm is supporting a charitable bike ride through Vietnam and needs
> > your help. For further information please visit
> > http://www.vietnambikeride.org
> >
> > -Confidentiality-
> > This email message and any attachments are confidential; they may be
> > subject to legal professional privilege and are intended for the named
> > recipient only. If you are not the named recipient, please return the
> > message and enclosures immediately and delete them from your system.
> >
> > -Caution-
> > Before advice received only by email (whether by attachment or
> otherwise)
> > may be relied on, the authenticity of the communication must be verified
> > by means independent of email.
> >
> > -Regulation-
> > The firm is regulated by the Law Society.
> >
> > -Partners-
> > A list of partners is available for inspection at each office of the
> firm
> > and on the firm's website at http://www.winckworths.co.uk
> >
> >
> >
> > _______________________________________________
> > FreeTDS mailing list
> > FreeTDS AT lists.ibiblio.org
> > http://lists.ibiblio.org/mailman/listinfo/freetds
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
> --------------
> Winckworth Sherwood Solicitors and Parliamentary Agents
> DX 148400 WESTMINSTER 5 : 35 Great Peter Street, London SW1P 3LR
> Telephone 020 7593 5000 Fax 020 7593 5099
>
> Do something amazing!
> The firm is supporting a charitable bike ride through Vietnam and needs
> your help. For further information please visit
> http://www.vietnambikeride.org
>
> -Confidentiality-
> This email message and any attachments are confidential; they may be
> subject to legal professional privilege and are intended for the named
> recipient only. If you are not the named recipient, please return the
> message and enclosures immediately and delete them from your system.
>
> -Caution-
> Before advice received only by email (whether by attachment or otherwise)
> may be relied on, the authenticity of the communication must be verified
> by means independent of email.
>
> -Regulation-
> The firm is regulated by the Law Society.
>
> -Partners-
> A list of partners is available for inspection at each office of the firm
> and on the firm's website at http://www.winckworths.co.uk
>
>
>
> _______________________________________________
> 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