Skip to Content.
Sympa Menu

freetds - Re: [freetds] Connecting MSSQL Server from Red Hat linux + PHP

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Arnar Birgisson" <ArnarB AT oddi.is>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Connecting MSSQL Server from Red Hat linux + PHP
  • Date: Tue, 01 Jul 2003 08:26:24 +0000

Hi there..

I configured my setup with --with-mssql and it works for me. I had to
dig a little in the sources for both php and freetds to solve several
problems, but the gain is that I get mssql_init, mssql_bind and
mssql_execute to work, which do not if you use the sybase extension.

If you try this you will hit some walls. First of all you need the
latest and greatest version of freetds, 0.61.1 I think (I'm currently
running out of CVS), as well as a fairly recent version of PHP (>=
4.3.2, although I haven't tried php 5 yet). Second, you might have some
problems, specificially with procedures returning output parameters and
empty result sets. As Tim suggested, test test test and test some more
is what you need to do. Then be mercyless to the good people on this
mailing list putting them to work if you find some bugs. :o)

Arnar

>>> tim AT diligence.com 30.6.2003 23:14:16 >>>
At 06:28 PM 6/30/2003 -0400, you wrote:
>Hi
>
>This is regarding connection MSSQL SERVER database from windows 2000
>server which is there in a different domain from my web which is
running
>on PHP4.1+APACHE_1.3.27+MYSQL+RED HAT Linux.
>This is the first time i 've come across this situation. I just got
the
>information from the PHP documentation about using freeTDS for this
purpose.

There seems to be a lot of confusion on this so I'll do my best to try
and
summarize the situation.

My situation is a bit different then yours because I am using freebsd
but
the process should be similar.

First you need to build/install freetds with the right parameters. This

means experimenting with database versions to get the right fit for
your
sql server version. For me the standard ports make install works just
fine.

Then you build php. I use the --with-sybase-ct=/path/to/freetds

This seems to work best for me. Whether you use sybase, sybase-ct or
mssql
you will get all the sybase* and mssql* functions. They are in fact
aliases
to each other in unix.

>For this freeTDS installation i was going thru the freeTSD
documentation
>and from some user contribution details in the php site. Some
mentioned
>about configuring with sybase libraries and some said with mssql. It
was
>bit confusing me which one to use.
>
>Could anyone help for install and configuring freeTDS in my linux
>server.Once it's done how to test it whether the MSSQL server database

>connectivity is working ok.


There is lots of help on the web on this very common setup but you will

need to experiment and test thoroughly. Create a table with all
possible
field types and select every combination you can think of. Select nulls

from boolean fields, set up huge and small varchars and select them,
test
blob fields. Test, test, test and do more testing before you put it
into
production.


:wq
Tim Uckun
US Investigations Services/Due Diligence
http://www.diligence.com/

_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds




Archive powered by MHonArc 2.6.24.

Top of Page