[freetds] FREETDS WITH ODBC NOT WORKING WITH PHP5
Riley Griffin
riley_396 at hotmail.com
Wed Jun 6 12:33:35 EDT 2007
Hello everyone, I have a problem that sounds similar to a message posted a
few days ago but I believe the solution will be quite different. I am
trying to use odbc connections in php scripts on an apache server to access
a mssql server. I am running Centos5. My php version is 5.1.6, my apache
version is 2.2.3 and my FreeTDS version is 0.64. I am able to use isql and
tsql and connect to the mssql server and query the database. The problem
occurs when I try running a php script. I get an error when attempting to
connect to the database:
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source
I tried using logs to find the problem:
util.c:288:Starting log file for FreeTDS 0.64
on 2007-06-06 09:25:58 with debug flags 0x4fff.
iconv.c:195:names for ISO-8859-1: ISO-8859-1
iconv.c:195:names for UTF-8: UTF-8
iconv.c:195:names for UCS-2LE: UCS-2LE
iconv.c:195:names for UCS-2BE: UCS-2BE
iconv.c:361:iconv to convert client-side data to the "ISO-8859-1" character
set
iconv.c:514:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
iconv.c:514:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
net.c:168:Connecting to (Server IP) port 1433.
net.c:237:tds_open_socket: (Server IP):1433: Permission denied
util.c:119:Changing query state from IDLE to DEAD
token.c:2252:tds_client_msg: #20009: "Server is unavailable or does not
exist.". Connection state is now 4.
mem.c:519:tds_free_all_results()
I read that this may be due to bad permissions on my freetds.conf file which
prevents the user apache from using the file but I tried changing the
permissions of the file and my results did not change.
I then used the exact same installation process on a computer that is
running Centos4 and php 4.3.9 and I was able to connect and query the
database using my php scripts.
Please help me, I am new to FreeTDS but I have been looking all over the
place for a solution to this problem with very little luck. I would be very
grateful for any and all help in resolving this issue. Thank you!
_________________________________________________________________
Play games, earn tickets, get cool prizes. Play nowit's FREE!
http://club.live.com/home.aspx?icid=CLUB_hotmailtextlink1
More information about the FreeTDS
mailing list