InlineTDS

From: Google Mike (googlemike_at_hotpop.com)
Date: 11/25/03


Date: 24 Nov 2003 21:11:42 -0800

In the ongoing saga to get FreeTDS and/or ODBC to work in PHP/Linux,
connecting to a remote MS SQL Server 2K system...

I decided to try InlineTDS...

I downloaded InlineTDS from http://library.freeodbc.org/ and put the
.so file in /usr/lib. I then added this to my /etc/odbcinst.ini...

[InlineTDS]
Description =
Driver = /usr/lib/odbc-i02.so
Setup = /usr/lib/libodbcmyS.so
FileUsage = 1
CPTimeout =
CPReuse =

...and this to my /etc/odbc.ini...

[odbc2test]
Description = InlineTDS
Driver = InlineTDS
Server = 40.40.40.40
Database = pubs
Port = 1433
Socket =
Option =
Stmt =

...from there, I was able to do...

isql odbc2test sa ''

...and then "select * from authors"...

It worked. I could also pull it open in Tora by connecting to
localhost and setting the database to "odbc2test". That piped to
localhost and then back out to the remote SQL Server.

I could also use ODBCConfig to see the settings were in there
properly.

So, if isql worked, then PHP should surely work with the following,
shouldn't it? I mean, isql is just one knotch above the tsql tool, I
thought.

$conn = odbc_connect('odbc2test','sa','');

...this didn't error out, and proceeds to the next statement just
fine...

$rows = odbc_exec($conn, 'select * from authors');

...but then halts there without an error, and without processing any
more lines -- even echoes -- beneath that line.

I guess you can't get there from PHP. MS SQL and PHP/Linux just don't
seem to mix.

Man, this sucks.



Relevant Pages

  • Re: Cannot connect a remote sql server
    ... I too have written quite a bit about connecting. ... Hitchhiker's Guide to Visual Studio and SQL Server ... such as the server's firewall, SQL Server's remote connection setting, ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Unable to connect to SQLExpress Remotely - no matter what
    ... Still no luck after as complete of a reinstall as I can do. ... Another note is that I'm connecting using SQL Server Authentication. ... fact that under the default settings SQL Server does not allow remote ...
    (microsoft.public.sqlserver.connect)
  • Re: Unable to connect to SQLExpress Remotely - no matter what
    ... Just to make sure it wasn't getting in the way, I turned my firewall ... Another note is that I'm connecting using SQL Server Authentication. ... fact that under the default settings SQL Server does not allow remote ...
    (microsoft.public.sqlserver.connect)
  • Re: Remote server not connecting
    ... connected to the local host but when i try to connect to the remote ... When connecting to SQL Server 2005, this failure may be caused by the ... fact that under the default settings SQL Server does not allow remote ...
    (microsoft.public.sqlserver.setup)
  • Re: TS vs VPN
    ... Using TS, w/o VPN ... The remote client connects to your local TS via Remote Desktop. ... "Foo" accesses the SQL server, which is nearby in a protected part of the network. ...
    (microsoft.public.windows.terminal_services)