This is a discussion on InlineTDS within the PHP Language forums, part of the PHP Programming Forums category; In the ongoing saga to get FreeTDS and/or ODBC to work in PHP/Linux, connecting to a remote MS ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |
|
|||
|
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. |
|
|||
|
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). |
|
|||
|
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.lists@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). |
|
|||
|
Terence <tk.lists@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. |
|
|||
|
jgrubb@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. |
|
|||
|
jgrubb@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. |