By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,061 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

InlineTDS

P: n/a
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.
Jul 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Google Mike wrote:
Man, this sucks.


Yeah, that's a bugger :/

As a last resort, can you connect to another ODBC datasource (not based
on MSSQL) which has linked tables to your MSSQL database -- ie, Access.

Alternatively (again, a last resort), you could use XML-RPC to talk to a
PHP installation running on the MS-SQL machine. This would be quite
expensive in terms of performance.

Jul 17 '05 #2

P: n/a
Terence wrote:
Google Mike wrote:
Man, this sucks.

Yeah, that's a bugger :/

As a last resort, can you connect to another ODBC datasource (not based
on MSSQL) which has linked tables to your MSSQL database -- ie, Access.

Alternatively (again, a last resort), you could use XML-RPC to talk to a
PHP installation running on the MS-SQL machine. This would be quite
expensive in terms of performance.


How bad do you need this?

I could maybe write you a little socket service using C# which takes
query strings and relays them to the SQL server, returning the results
in serialised XML (a string).

Jul 17 '05 #3

P: n/a
I've got some help for you. Visit iodbc.org. There is an SDK with
instructions on how to get it integrated with PHP. The SDK will work
with FreeTDS.

The site is the Open Source side of Openlink Software. We have a SQL
server driver that you can get a free download for trial and help
installing and configuring it. Ours is commonly used for PHP-MSSQL
access.

Terence <tk******@fastmail.fm> wrote in message news:<3fc2f886@herald>...
Terence wrote:
Google Mike wrote:
Man, this sucks.

Yeah, that's a bugger :/

As a last resort, can you connect to another ODBC datasource (not based
on MSSQL) which has linked tables to your MSSQL database -- ie, Access.

Alternatively (again, a last resort), you could use XML-RPC to talk to a
PHP installation running on the MS-SQL machine. This would be quite
expensive in terms of performance.


How bad do you need this?

I could maybe write you a little socket service using C# which takes
query strings and relays them to the SQL server, returning the results
in serialised XML (a string).

Jul 17 '05 #4

P: n/a
Terence <tk******@fastmail.fm> wrote:

How bad do you need this?

I could maybe write you a little socket service using C# which takes
query strings and relays them to the SQL server, returning the results
in serialised XML (a string).


Thanks. I once wrote an old VB6 socket service for a Telnet server
that would work pretty well for this. I'd just convert it to do
something different. I'm hoping I don't have to go down this avenue,
though, because I'd love to stick with TDS, the native protocol for
interacting with SQL Server.
Jul 17 '05 #5

P: n/a
jg****@openlinksw.com (Jay Grubb) wrote:
I've got some help for you. Visit iodbc.org. There is an SDK with
instructions on how to get it integrated with PHP. The SDK will work
with FreeTDS.

The site is the Open Source side of Openlink Software. We have a SQL
server driver that you can get a free download for trial and help
installing and configuring it. Ours is commonly used for PHP-MSSQL
access.


Thank you, thank you, thank you. I will look into it! I have avoided
iodbc simply because I was sort of getting somewhere at commandline
with unixODBC.
Jul 17 '05 #6

P: n/a
jg****@openlinksw.com (Jay Grubb) wrote in message:
I've got some help for you. Visit iodbc.org. There is an SDK with
instructions on how to get it integrated with PHP. The SDK will work
with FreeTDS.

The site is the Open Source side of Openlink Software. We have a SQL
server driver that you can get a free download for trial and help
installing and configuring it. Ours is commonly used for PHP-MSSQL
access.


Sounds great, but it costs $549 for the driver for 5 concurrent users,
$999 for 10 concurrent users, $2499 for 25 concurrent users, and $3499
for unlimited users (USA prices on 11/26/2003). I wish you luck with
other customers, because I believe in capitalism, but I'm going to see
if I can't go the free route.
Jul 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.