Skip to Content.
Sympa Menu

freetds - Re: [freetds] PHP 5.2.6 + pdo_dblib + FreeTDS 0.64 -- tds_open_socket: Unknown error: 0

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Kian Mohageri" <kian.mohageri AT gmail.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] PHP 5.2.6 + pdo_dblib + FreeTDS 0.64 -- tds_open_socket: Unknown error: 0
  • Date: Wed, 23 Jul 2008 19:37:08 -0700

On Wed, Jul 23, 2008 at 5:13 PM, James K. Lowden <jklowden AT freetds.org> wrote:
> Kian Mohageri wrote:
>> [foobar]
>> host = foobar.housing.wwu.edu
>> port = 2638
>> tds version = 5.0
>
> Is this a Sybase server? What says:
>

Yes.

> $ tsql -S foobar -U user -P passwd
>

$ tsql -S foobar -U user -P pass
locale is "C"
locale charset is "US-ASCII"
1> exit

> It don't expect it to solve your problem, but I recommend upgrading to
> 0.82 while you're at it. The code in the vicinity of
>

I went ahead and upgraded to 0.82 and rebuilt pdo_dblib against it.
tsql still works, but not PDO.

Slightly different error:

Fatal error: Uncaught exception 'PDOException' with message
'SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or
does not exist (severity 9)

Same end result, though, it seems.

config.c:257:Success: [foobar] defined in /usr/local/etc/freetds.conf.
config.c:619:Setting 'dump_file' to 'stdout' from $TDSDUMP.
config.c:195:Final connection parameters:
config.c:196: server_name = foobar
config.c:197: port = 2638
config.c:198: major_version = 5
config.c:199: minor_version = 0
config.c:200: block_size = 0
config.c:201: language = us_english
config.c:202: server_charset =
config.c:203: connect_timeout = 10
config.c:204: client_host_name = dev.housing.wwu.edu
config.c:205: app_name = PHP freetds
config.c:206: user_name = user
config.c:209: library = DB-Library
config.c:210: bulk_copy = 0
config.c:211: suppress_language = 0
config.c:212: encrypt level = 0
config.c:213: query_timeout = 10
config.c:216: client_charset = ISO-8859-1
config.c:217: ip_addr = 140.160.12.123
config.c:218: instance_name =
config.c:219: database =
config.c:220: dump_file = stdout
config.c:221: debug_flags = ffff
config.c:222: text_size = 0
config.c:223: broken_dates = 0
config.c:224: broken_money = 0
config.c:225: emul_little_endian = 0
19:27:18.240405 12864 (log.c:190):Starting log file for FreeTDS 0.82
on 2008-07-23 19:27:18 with debug flags 0xffff.
19:27:18.240512 12864 (iconv.c:197):names for ISO-8859-1: ISO-8859-1
19:27:18.240527 12864 (iconv.c:197):names for UTF-8: UTF-8
19:27:18.240543 12864 (iconv.c:197):names for UCS-2LE: UCS-2LE
19:27:18.240558 12864 (iconv.c:197):names for UCS-2BE: UCS-2BE
19:27:18.240572 12864 (iconv.c:363):iconv to convert client-side data
to the "ISO-8859-1" character set
19:27:18.240600 12864 (iconv.c:516):tds_iconv_info_init: converting
"ISO-8859-1"->"UCS-2LE"
19:27:18.240697 12864 (net.c:210):Connecting to 140.160.12.123 port
2638 (TDS version 5.0)
19:27:18.240926 12864 (net.c:264):tds_open_socket: connect(2) returned
"Unknown error: 0"
19:25:24.984196 12837 (util.c:334):tdserror(0x29fab120, 0x28770100, 20009, 0)
19:25:24.984238 12837 (dblib.c:7782):dbperror(0x29fc7040, 20009, 0)
19:25:24.984267 12837 (dblib.c:7835):20009: "Unable to connect:
Adaptive Server is unavailable or does not exist"

If you'd like me to paste the entire debugging output, I can.

FWIW, I tried to check that things are linked to the right libraries
with ldd(1).

Thanks for helping me out here. I hope I'm not just missing something
obvious :\

-Kian




Archive powered by MHonArc 2.6.24.

Top of Page