[freetds] can't connect through php

cwiles at eperformax.com cwiles at eperformax.com
Sat Jun 26 14:48:36 EDT 2004

I did look at my log and the username and password are correct
> 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

More information about the FreeTDS mailing list