Skip to Content.
Sympa Menu

freetds - AW: AW: AW: [freetds] connect problem to mssql 7.0

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Roland Bole" <roland.bole AT gmx.at>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: AW: AW: AW: [freetds] connect problem to mssql 7.0
  • Date: Sat, 20 Dec 2003 09:36:26 +0100



I have also established connections, see netstat -ap according to the PID

------------
tcp 0 0 xxx.xxx.xxx.xxx:34061 elbefs01:1433
ESTABLISHED 18597/httpd
tcp 0 0 xxx.xxx.xxx.xxx:www 81-223-154-70.dyna:4529
ESTABLISHED 18597/httpd
------------

Why mssql_pconnect returns false ????




>
> >
> > Now i have rebuild php and i have also a new build date, that is ok,
> >
> > Tsgl work, ok
> >
>
> Well
>
> > Mssql_pconnect, can not connect to sql server ????
> >
>
> > >If data get returned mssql_pconnect have to work...
>
> $db_conn = mssql_pconnect ($sql_host,$sql_user,$sql_pass) or
> die ("Could not connect to database: ".mssql_get_last_message());
>
> This is the last report:
> Could not connect to database: Changed language setting to us_english.
>
> DB settings the same like bevor.
>
>

>>"Changed language setting to us_english" it's just a message from
>>server, however connect fails...
>>Did you remember that usually apache use another user (nobody or apache
>>usually) and that ~/.freetds.conf work only for your user?
>>If you use

>>tsql -Smyserver -Umyuser -Pmypassword

>>you should have

>>$sql_host = 'myserver';
>>$sql_user = 'myuser';
>>$sql_pass = 'mypassword';

>>in your script.

>>Also fill correct freetds.conf file (I think
>>/usr/local/freetds/etc/freetds.conf if you configured FreeTDS with
>>--prefix=/usr/local/freetds)

>>freddy77


You should have right.

Mysql_pconnect have to connect, because: I can see it in the freetds.log

--
iconv to convert client-side data to the "ISO-8859-1" character set
07:36:57.763837 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
07:36:57.763998 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
07:36:57.764078 Connecting to xxx.xxx.xxx.xxx port 1433, TDS 7.0.
---
There is no error

And also php last function: mssql_get_last_message()
Give me the following message:

Changed language setting to us_english.

So there must be a connect ???? Is this right????

BUT PHP can not make a "true" connection, because mysql_pconnect returns
false.

Tsgl can connect successfully and I can also make some sql queries.

$db_conn = mssql_pconnect ($sql_host,$sql_user,$sql_pass) or
die ("Could not connect to database: ".mssql_get_last_message());

$sql_host,$sql_user,$sql_pass have the right values like I use in tsgl,
that´s OK,

The question is: why php can not return true, if there is a connect (see
freetds.log)

The only error which is reported is during the ececution of the query with
tsgl:
-----------
ZUM ZAUCHNERWIRT
ZUPAN PATRICIA
Msg 2403, Level 16, State 0, Server OpenClient, Line 0
WARNING! Some character(s) could not be converted into client's character
set. Unconverted bytes were changed to question marks ('?').
Z?RICH KOSMOS
------------------

This error come also by start of the connect with tsgl.

WARNING! Some character(s) could not be converted into client's character
set. Unconverted bytes were changed to question marks ('?').

Freetds.conf settings are located in /usr/local/freetds/etc/
[global]
# TDS protocol version
tds version = 7.0
try server login = yes
dump file = /tmp/freetds.log
debug level = 10
text size = 64512
[elbefs01]
host = xxx.xxx.xxx.xxx
port = 1433
tds version = 7.0


what can I do ?????

roland



_______________________________________________
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







Archive powered by MHonArc 2.6.24.

Top of Page