Skip to Content.
Sympa Menu

freetds - Re: [freetds] Connection Errors...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Connection Errors...
  • Date: Sat, 18 Jun 2005 14:13:51 -0400

Rick Conner wrote:
> From the host making the connection, does "telnet 66.208.184.170 1433"
> work? I bet it doesn't. Is there a firewall in between?
> =========================
> Yes, my web host is able to do a telnet to the remote server. And I am
> able to connect from my system as well. All the necessary ports are open
> (1433).

OK, so we know the web host can connect to the database server. Does tsql
work on it? Something seems to be preventing the server from getting its
response back to the web host.

> Is there any possibility that the FreeTDS installation could be
> installed into PHP incorrectly? What I'm wondering now is the lines that
> read:
>
> 16:33:45.235066 tds_put_string wrote 0 bytes
> 16:33:45.235247 tds_process_login_tokens()
>
> Why is the first line writing 0 bytes? Is that not where the login
> information is sent? Just prior to the tds_process_login_tokens?

That's normal. The lines in the log preceding tds_process_login_tokens()
relate to composing the login packet, which unsurprisingly comprises
several fields. tds_process_login_tokens() then reads the response from
the server.

Here's your log:

15:33:45.330577 tds_put_string converting 10 bytes of "DB-Library"
15:33:45.330590 tds_put_string wrote 20 bytes
15:33:45.330603 tds_put_string converting 10 bytes of "us_english"
15:33:45.330616 tds_put_string wrote 20 bytes
15:33:45.330629 tds_put_string wrote 0 bytes

>From src/tds/login.c:

tds_put_string(tds, tds_dstr_cstr(&connection->library), library_len);
tds_put_string(tds, tds_dstr_cstr(&connection->language), language_len);
tds_put_string(tds, tds_dstr_cstr(&connection->database), database_len);

If you don't specify a database name when you connect, that field in the
login packet is empty.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page