freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
RE: [freetds] mssql_connect fails using PHP4.3.3, freetds-0.61.2
- 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 13:28:23 +0100
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.
Bill
> -----Original Message-----
> From: Samuel Luxford-Watts [SMTP:slwatts AT winckworths.co.uk]
> Sent: 09 September 2003 13:10
> To: 'freetds AT lists.ibiblio.org'
> Subject: [freetds] mssql_connect fails using PHP4.3.3, freetds-0.61.2
>
> Hi all,
>
> HELP!! I have been battling for some time now to try and get my linux box
> to pull data from an MS SQL server. I have got to the state where tsql
> connects to the server fine (but warns about locales):
>
> locale is
> "LC_CTYPE=en_GB;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSA
> GE
> S=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_I
> DE
> NTIFICATION=C"
> charset is "ISO-8859-1"
> Password:
> Msg 5703, Level 0, State 1, Server STJAMES, Line 0
> Changed language setting to us_english.
> 1> quit
>
> but when I then try to run a php script (from a web page) I get the
> following displayed in the browser:
>
> Warning: mssql_connect(): message: Language requested in login
> 'uk_english'
> is not an official language name on this SQL Server. Login fails.
> (severity
> 11) in /www/htdocs/test.php on line 6
>
> Warning: mssql_connect(): message: Login failed for user 'sa'. (severity
> 14)
> in /www/htdocs/test.php on line 6
>
> Warning: mssql_connect(): Unable to connect to server: STJames in
> /www/htdocs/test.php on line 6
>
> Warning: mssql_close(): Unable to connect to server: (null) in
> /www/htdocs/test.php on line 11
>
> Warning: mssql_close(): A link to the server could not be established in
> /www/htdocs/test.php on line 11
>
>
> I have turned on logging and /tmp/freetds.log contains:
>
> Starting log file for FreeTDS 0.61.2 with debug level 99.
> 2003-09-08 22:15:05.112079 iconv will convert client-side data to the ""
> charact
> er set
> 2003-09-08 22:15:05.112183 IP address pointer is NULL
> 2003-09-08 22:15:05.112197 Server SYBASE not found!
>
>
> I did try modifying /etc/freetds/locales.conf by adding an en_GB section
> but
> that made no difference at all. I am in the UK and both my SQL and Linux
> machines are configured to use UK/GB english (I think!)
>
> Can anyone help? I am guessing that I need to setup the locales.conf file
> but I really dont know what to change/enter.
>
> Thanks in advance,
>
> Sam
>
> I am running:
> SUSE linux 8.2
> apache 1.3.28
> php 4.3.3
> freetds 0.61.2
>
> and MS SQL server 7 on Windows NT
>
> I compiled the free tds package with --enable-msdblib and
> --sysconfdir=/etc/freetds
> and I compiled PHP with --with-mysql --with-apxs=/www/bin/apxs
> --with-mssql=/usr/local
>
> The php script I am running is:
>
>
> <?php
>
> $msserver="STJames";
> $usrname="sa";
> $passwrd="secret";
> $conn=mssql_connect($msserver, $usrname, $passwrd);
> if ($conn)
> $body .= "<font color='blue'>Connection to $msserver was
> successful.</fo
> nt><hr>";
> else
> $body.="<font color='red'>Error:
> ".mssql_get_last_message()."</font><hr>
> ";
> $conn=mssql_close();
> if ($conn)
> $body.="<font color='blue'>Connecytion closed OK</font><hr>";
> else
> $body.="<font color='red'>Error:
> ".mssql_get_last_message()."</font><hr>
> ";
> ?>
>
>
>
>
> --------------
> 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] mssql_connect fails using PHP4.3.3, freetds-0.61.2,
Samuel Luxford-Watts, 09/09/2003
- <Possible follow-up(s)>
- RE: [freetds] mssql_connect fails using PHP4.3.3, freetds-0.61.2, Thompson, Bill D (London), 09/09/2003
- RE: [freetds] mssql_connect fails using PHP4.3.3, freetds-0.61.2, Samuel Luxford-Watts, 09/09/2003
- RE: [freetds] mssql_connect fails using PHP4.3.3, freetds-0.61.2, Thompson, Bill D (London), 09/09/2003
- RE: [freetds] mssql_connect fails using PHP4.3.3, freetds-0.61.2, Samuel Luxford-Watts, 09/09/2003
- RE: [freetds] mssql_connect fails using PHP4.3.3, freetds-0.61.2, Thompson, Bill D (London), 09/09/2003
- RE: [freetds] mssql_connect fails using PHP4.3.3, freetds-0.61.2, Samuel Luxford-Watts, 09/09/2003
Archive powered by MHonArc 2.6.24.