freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: syntax for connecting to database with FreeTDS?
- From: bao nguyen <baonguyenx AT yahoo.com>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: syntax for connecting to database with FreeTDS?
- Date: Mon, 11 Dec 2000 12:50:46 -0800 (PST)
Set environment in your bin/apachetl or
/etc/rc.d/init.d/httpd by adding these lines
SYBASE=/usr/local/freetds
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$SYBASE/lib
export SYBASE LD_LIBRARY_PATH
Then restart your apache. It should be working.
If you don't want to add the above lines to apachetl,
you need to add the following lines in every of your
php script
putenv("SYBASE=/usr/local/freetds");
putenv("TDSVER=70");
--- aellist <aellist AT chg.mc.duke.edu> wrote:
> I have been working with our Unix admin to get a
> connection working between
> PHP 4.03pl1 and Sybase 11.5, running on Apache and
> Solaris. Needless to say,
> it has not been smooth sailing. Our final solution
> (at this point) is to use
> FreeTDS. It has been compiled into PHP without a
> problem.
>
> I am not able to connect to the sybase server using
> PHP, and I want to make
> sure I don't need to do something special to use
> FreeTDS. (this will help
> eliminate 1 of several possible problems in the
> setup).
>
> Currently, I'm just trying:
> <?
> if
> (sybase_connect("$SERVER_IP_PORT","$USER","$PASS"))
> echo "CONNECTED!!!";
> ?>
>
> The variables are correct. But PHP returns the
> following error:
> "Warning: Sybase: Unable to connect in
> /usr/http/htdocs/test.php on line 11"
>
> As a complete newbie to FreeTDS, could you please
> let me know if I need to
> use a different function or syntax to connect using
> FreeTDS. Conversely, let
> me know if I'm doing this correctly so that I can
> move onto other possible
> causes of the problem.
>
> Thanks in advance,
> Andrew Elliston
>
> Center for Human Genetics
> Duke University
>
>
> ---
> You are currently subscribed to freetds as:
> [baonguyenx AT yahoo.com]
> To unsubscribe, forward this message to
$subst('Email.Unsub')
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/
-
syntax for connecting to database with FreeTDS?,
aellist, 12/11/2000
- <Possible follow-up(s)>
- RE: syntax for connecting to database with FreeTDS?, Wasson, Tim, 12/11/2000
- RE: syntax for connecting to database with FreeTDS?, aellist, 12/11/2000
- Re: syntax for connecting to database with FreeTDS?, bao nguyen, 12/11/2000
- RE: syntax for connecting to database with FreeTDS?, Tom Samplonius, 12/12/2000
- RE: syntax for connecting to database with FreeTDS?, aellist, 12/14/2000
Archive powered by MHonArc 2.6.24.