help about freetds and php

"shiqiang.yan" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
hi:
    i set up freetds and php to connect sql 2005. 

   ./configure --prefix=/opt/deploy/amp/freetds --with-tdsver=8.0 --enable-msdblib --enable-dbmfix --with-gnu-ld
   make 
   make install
   

   Using tsql I success.
   tsql -S msserver -U sa
     
   I build the php extension.  
   
   BUT faild using php ,  the scripts is :
 
 <?php
  putenv('TDSVER=80');
  $hostname = "msserver_ipaddress:1433";
  $user="sa";
  $passwd="xxxxxxx";
  $db_id = mssql_connect($hostname,$dbuser,$dbpasswd) or die("Couldn't connect the server!\
n");
  mssql_close($db_id); 
?>

   Who could help to sovle the problem? Thank you very much!

I capute the info dump as below:

    log.c:190:Starting log file for FreeTDS 0.82
    on 2009-02-21 17:11:55 with debug flags 0x4fff.
iconv.c:197:names for ISO-8859-1: ISO-8859-1
iconv.c:197:names for UTF-8: UTF-8
iconv.c:197:names for UCS-2LE: UCS-2LE
iconv.c:197:names for UCS-2BE: UCS-2BE
iconv.c:363:iconv to convert client-side data to the "ISO-8859-1" character set
iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
net.c:210:Connecting to 202.206.32.203 port 1433 (TDS version 8.0)
net.c:264:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:303:tds_open_socket() succeeded
util.c:162:Changed query state from DEAD to IDLE
util.c:162:Changed query state from IDLE to DEAD
util.c:334:tdserror(0x96c5160, 0x9706278, 20002, 0)
dblib.c:7782:dbperror(0x9705b10, 20002, 0)
dblib.c:7835:20002: "Adaptive Server connection failed"
dblib.c:7856:"Adaptive Server connection failed", client returns 2 (INT_CANCEL)
util.c:368:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:389:tdserror: returning TDS_INT_CANCEL(2)
dblib.c:1372:dbclose(0x9705b10)
dblib.c:256:dblib_del_connection(0x23e3a0, 0x9706278)
mem.c:563:tds_free_all_results()
dblib.c:303:dblib_release_tds_ctx(1)
dblib.c:5727:dbfreebuf(0x9705b10)
dblib.c:718:dbloginfree(0x97057f0)
dblib.c:1442:dbexit(void)
dblib.c:303:dblib_release_tds_ctx(1)



shiqiang.yan
2009-02-21
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.