Skip to Content.
Sympa Menu

freetds - Re: [freetds] can't connect through php

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: cwiles AT eperformax.com, FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Cc:
  • Subject: Re: [freetds] can't connect through php
  • Date: Sat, 26 Jun 2004 12:44:59 -0400

On Fri, 25 Jun 2004, "Cory D. Wiles" wrote:
>
> I was able to install freetds just fine and I am able to telnet/use tsql
>
> to connect to the database but when I try to do it through my php test
> page I get a failed connection error. I checked my freetds log and this
>
> is what it said:
> TDS: Write failed in tds_write_packet
> Error: 111 (Connection refused)
> 12:01:32.279874 tds_client_msg: #20006: "Write to SQL Server failed.".

Well, that means what it says: you failed to establish a connection. The
message comes from write.c, line 438.

Does the PHP box have network connectivity to the server's host?

Perhaps the PHP environment is different from tsql's, such that PHP isn't
referencing the same freetds.conf? Or perhaps it's not using the same
login, and is failing authentication?

With TDS version 4.2, the login packet is written to the log, complete
with username and password. You might try that, just to confirm the login
conforms to your expectations.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page