Re: unixODBC Question/Problem

From: Date: Thu, 29 Nov 2001 21:49:02 +0000
Subject: Re: unixODBC Question/Problem
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-14706@lists.php.net to get a copy of this message
Eric Liedtke wrote:
I am running PHP/Apache. I have installed unixODBC and inlinks tds driver. I can succesfully connect and query an MS SQL db from the isql command line testing tool provided with unixODBC. I recompiled php with unixODBC support and it compiled and installed without a problem. So it was onto writing the php. I can connect query and close the DB fine. However my query results always have 1 of 2 things. Either they are empty or the contain gibberish. At this point I don't know where to start troubleshooting the breakdown. Any help would be greatly appreciated. I don't know what info anyone might need from me, but will be more than happy to provide it. Thanks in advance. Eric Liedtke p.s. on a google search I found only one other mention of this in a dbforum website. sadly there were no replies to the posting there. I just wanted to drop a note out that I got my problem fixed. This is what I did to fix it...
putenv("ODBCINI=/usr/local/etc/odbc.ini"); putenv("ODBCINSTINI=/usr/local/etc/odbcinst.ini"); putenv("LD_LIBRARY_PATH=/usr/local/freetds/lib"); at the begining of the php script. Specifically the LD_LIBRARY_PATH did it. Without it I get garbage. I have no idea why and would be curious if there is any other solution, but regardless I just thought I'd point this out. This actually came out of the example script in the iODBC php howto page on iodbc.org. Just and fyi Eric Liedtke

« previous php.db (#14706) next »