Skip to Content.
Sympa Menu

freetds - Re: [freetds] connect problem to mssql 7.0

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Daniel Fazekas <fdsubs AT axelero.hu>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] connect problem to mssql 7.0
  • Date: Mon, 15 Dec 2003 07:03:00 +0100

On Dec 15, 2003, at 3:49, James K. Lowden wrote:

On Sun, 14 Dec 2003, "roland bole" <roland.bole AT gmx.at> wrote:

Could this be a problem also for the apache.
Have I set up the $FREETDSCONF var in a profile file ?
That's not easy, right? Because apache runs under the "nobody" account,
which has no home directory? I mean, there's no ~nobody/.profile.

You can achieve the desired effect temporarily by restarting apache:

[root@]# apachectl stop
/usr/sbin/apachectl stop: httpd stopped
[root@]# TDSDUMPCONFIG=/tmp/tdscfg.txt apachectl start

To make this permanent, you'll have to edit the init file your specific system is using, which varies by vendor.
For example it's /etc/rc.d/init.d/httpd on Red Hat or /System/Library/StartupItems/Apache/Apache on Mac OS X.

I've seen people set environment variables in their PHP scripts, but I
don't have any advice for you on that score.

I believe that would be too late, unless maybe the case when you are dynamically loading the mssql/sybase PHP extension in your script, which is not possible on multi-threaded servers. http://www.php.net/dl for more info.

Otherwise, even Apache's mod_env module is seemingly too late in the process to affect FreeTDS.
http://httpd.apache.org/docs/mod/mod_env.html
http://httpd.apache.org/docs-2.0/mod/mod_env.html

Although the PHP scripts could see then see the environment variables set by SetEnv, it doesn't seem to have any effect on FreeTDS.

--
fds





Archive powered by MHonArc 2.6.24.

Top of Page