Skip to Content.
Sympa Menu

freetds - Re: configuring SQL Servers -- Really Really stuck

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT umcc.ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: configuring SQL Servers -- Really Really stuck
  • Date: Wed, 18 Aug 1999 05:51:00 -0400 (EDT)


You can put it in httpd.conf and restart apache (at least the SYBASE
variable). The exact command escapes me at the moment but its something
like SetEnv I think.

Brian

On Wed, 18 Aug 1999, Francis Smit wrote:

> Thanks again I think I am close now I did all that you said
> and then put the following into my test script:
> <html><head><title>Grislys PHP Test Page</title></head>
> <body bgcolor=green color=center>
>
> <h1 align=center><font color=aqua>Grislys PHP Test Page</font></h1>
> <hr>
> <br>
> <br>
> <br>
> <?php if(!isset($Btn))
> ????? {
> ??????? $SYBASE = getenv("SYBASE");
> ??????? $LD_LIBRARY_PATH = getenv("LD_LIBRARY_PATH");
> ??????? echo "\$SYBASE == $SYBASE<br>\n";
> ??????? echo "\$LD_LIBRARY_PATH == $LD_LIBRARY_PATH<br>\n";
> ??????? $con = mssql_connect("JDBC", "guest", "sybase");
> ??????? if(!isset($con))
> ??????? {
> ????????? echo "oops \$con is not set<br>\n";
> ??????? }elseif($con > 0)
> ??????? {
> ????????? echo "cool \$con == $con<br>\n";
> ??????? }elseif($con == 0){
> ????????? echo "Bad \$con == ($con) == 0<br>\n";
> ??????? }else{
> ????????? echo "Bad \$con == $con\n<br>";
> ??????? }
> ??????? mssql_close($con);
> ????? }else{? // if(!isset($Btn))? ....
> ????? }? // if(!isset($Btn))? ....
> ?>
> </body></html>
>
> But I just get:
> $SYBASE ==
> $LD_LIBRARY_PATH ==
> Bad $con == () == 0
>
> Warning: 0 is not a Sybase link index in
> /home/francis/public_html/ExDB.php3 on line 27
> in my page body, so clearly my vars are not set; I tried to do this in
> /etc/profile:
>
> SYBASE='/usr/local/freetds'
> LD_LIBRARY_PATH="$SYBASE/lib"
>
> export SYBASE LD_LIBRARY_PATH
>
> clearly httpd does not get this so where should I put it????
> does freeTDS have a config file I can put it in???
>
> Brian Bruns wrote:
>
> Hmmm....ok, 2 other things you must have a SYBASE environment
> variable set
> to the installed directory, say:
>
> export SYBASE=/usr/local/freetds
>
> and for good measure, although not always necessary, add
> $SYBASE/lib to
> your LD_LIBRARY_PATH (assumming linux...otherwise it may be
> LIBPATH or
> some such)
>
> export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$SYBASE/lib
>
> The other thing is I guess I should have mentioned that the
> user name and
> password for the JDBC server is 'guest' and 'sybase'
> respectively.
> Database is 'pubs2' if you care.
>
> --
> 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?
> ? --- You are currently subscribed to freetds as: camber AT ais.org To
> unsubscribe, forward this message to
> $subst('Email.Unsub')
>





Archive powered by MHonArc 2.6.24.

Top of Page