473,386 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

InlineTDS

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
6 2045
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Google Mike | last post by:
After a lot of thought and research, and playing with FreeTDS and InlineTDS, as well as various ODBC connections, I have determined that the fastest and cheapest way to get up and going with PHP on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.