Skip to Content.
Sympa Menu

freetds - Re: via PHP to Microsoft SQL Server V7.0

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Francis Smit <francis AT oztel.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: via PHP to Microsoft SQL Server V7.0
  • Date: Tue, 18 Jan 2000 09:33:26 +1100

I tried to do this several times, but there doesn't seem to be
enough docs, and test stuff to get there, (unless you really,
know this stuff :-)# ), how ever there are a lot of kind helpful
people out there, (unfortunately either I or they seem to run
out of time just a bit too soon, ohhh well).

In short yes I do believe it can be done, but I wish I could
do it, if you succeed could you please, please give some
hints I for one would rather use an open source product than
the limited version of a rather greedy commercial product, we
are currently looking at.

James Cameron wrote:

I'm struggling to get php working with freetds to query a Microsoft SQL
Server ... has anyone done this recently?  Is it doable?  Can anyone
point at example php scripts?

Problem: when running php against a script that tries to connect to the
database, an strace shows that a name server lookup is made for a host
"\0ctual", a null length string.  The host set in the call was "actual";
the first letter is overwritten.  The null host is not resolved and so
the sybase_connect() call fails.

When running it within gdb, however, the host name is not corrupted and
the connection request is sent out on the 'net.

If the network is disconnected, and the php script is run without gdb,
it pauses on the name server lookup.  Activating gdb against the running
process (gdb `which php` $pid) shows the host name is again corrupt.

It appears the change to the host name is occuring within freetds's
dblib/dblic.c code.

Configuration: Red Hat V5.2, php-3.0.14, freetds-0.50.

--
James Cameron                                      (cameron AT stl.dec.com)

http://www.opensource.org/ http://vanilla.us.netrek.org/ http://lwn.net/

---
You are currently subscribed to freetds as: francis AT oztel.com
To unsubscribe, forward this message to $subst('Email.Unsub')

--

                                           Grisly    . oo
                                                      `oO
Francis Smit
 

Knowledge By Design/OzTel
Suite 201, 683 George st
Sydney 2000 NSW

mailto:francis AT kbd.com.au

Tel: +61 2 9212 1399
Fax: +61 2 9212 5727
___________________________________
m$: How can we stuff you up today?
 



Archive powered by MHonArc 2.6.24.

Top of Page