freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] bypass freetds.conf, tsql works, freetds.conf and php doesn't work
- From: lisa yang <yang_wayne AT yahoo.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] bypass freetds.conf, tsql works, freetds.conf and php doesn't work
- Date: Tue, 19 Jul 2005 08:25:02 -0700 (PDT)
Actually I passed my 70-215 last January, it is over 1 year now. I am not
sure if there is a limited time for passing all exams to get the
certification. Do you know?
"James K. Lowden" <jklowden AT freetds.org> wrote:lisa yang wrote:
> Since We used XAMPP (http://www.apachefriends.org/en/) for our Apach,
> PHP, MySQL setting, which has FreeTDS installed and configured by
> default.
OK, then you really have to talk to them. See below for the issue.
> 1. How to make freeTDS use freetds.conf instead of bypassing it?
You're not "bypassing" freetds.conf when you're running Apache. FreeTDS
is linked in -- i.e. part of -- the Apache executable. What's happening
is that FreeTDS is not finding freetds.conf because it's not where it
should be, where "should" is defined by how it was configured when it was
built.
Neither you nor I know what FreeTDS options were used at build time. If
you find that out, you'll know where to put your freetds.conf. Or, at
least, you *can* know. Right now, it's anybody's guess.
> I don't know why there is no TDSDUMP log file (I have run $ export
> TDSDUMP=/etc/freetds.log ) and why $ export
> FREETDSCONF=/etc/freetds.conf doesn't work.
I think what you're missing is some basic knowledge about how environment
variables work. Even though it's a little off-topic here, I'll explain if
you'll bear with me.
When Apache starts, it's running under an account, just as you're running
under an account when you log in. Whatever variables you set affect your
session and no one else's, include Apache's. For those variables to have
any effect on FreeTDS, they have to be set in Apache's session before it
starts. And the account that Apache is running under needs write access
to the file named in TDSDUMP/FREETDSCONF. I point that out because it's
unlikely that the Apache account, 'httpd' or whatever it is, will have
write access to /etc. TDSDUMP=/tmp/freetds.log might be a better choice.
You do give me a novel idea for a future feature, though! If FreeTDS
monitored the SQL, it could trap select statements to a "magic" table.
Then if you issued a query like "select * from FREETDSCONF_MAGICTABLE", it
would return a result set of its configuration information. That would be
cool.
(A less ambitious project would be to add the information you need to
"tsql -C".)
But we don't have a magic table. You'll have to ask the XAMPP folks.
> 2. If in my PHP code,
> mssql_connect ("domainName:1433", "sa", "XXXXX");
>
> If successfully connected to MS SQL 2000 and successfully selected the
> tables I wanted, do I really need to care about freetds used
> freetds.conf or not?
Well, maybe, maybe not. There are other options controlled by
freetds.conf that you can't set that way. And if your server's name/port
changes, it would be nice not to have that stuff burned into your
application.
HTH.
--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
---------------------------------
Start your day with Yahoo! - make it your home page
-
[freetds] bypass freetds.conf, tsql works, freetds.conf and php doesn't work,
lisa yang, 07/13/2005
-
Re: [freetds] bypass freetds.conf, tsql works, freetds.conf and php doesn't work,
James K. Lowden, 07/13/2005
- Re: [freetds] bypass freetds.conf, tsql works, freetds.conf and php doesn't work, lisa yang, 07/14/2005
- <Possible follow-up(s)>
-
Re: [freetds] bypass freetds.conf, tsql works, freetds.conf and php doesn't work,
Lowden, James K, 07/14/2005
-
Re: [freetds] bypass freetds.conf, tsql works, freetds.conf and php doesn't work,
lisa yang, 07/18/2005
-
Re: [freetds] bypass freetds.conf, tsql works, freetds.conf and php doesn't work,
James K. Lowden, 07/18/2005
-
Re: [freetds] bypass freetds.conf, tsql works, freetds.conf and php doesn't work,
lisa yang, 07/19/2005
- Re: [freetds] bypass freetds.conf, tsql works, freetds.conf and php doesn't work, lisa yang, 07/19/2005
-
Re: [freetds] bypass freetds.conf, tsql works, freetds.conf and php doesn't work,
lisa yang, 07/19/2005
-
Re: [freetds] bypass freetds.conf, tsql works, freetds.conf and php doesn't work,
James K. Lowden, 07/18/2005
-
Re: [freetds] bypass freetds.conf, tsql works, freetds.conf and php doesn't work,
lisa yang, 07/18/2005
- Re: [freetds] bypass freetds.conf, tsql works, freetds.conf and php doesn't work, ZIGLIO, Frediano, VF-IT, 07/19/2005
-
Re: [freetds] bypass freetds.conf, tsql works, freetds.conf and php doesn't work,
James K. Lowden, 07/13/2005
Archive powered by MHonArc 2.6.24.