Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

ddick (5726)

  (email not shown publicly)

I'm based out of Melbourne, Australia. I attend the excellent meetings whenever i get the chance, which is not often enough.

Journal of ddick (5726)

Tuesday March 09, 2010
04:27 AM

mod_perl, freetds and environment variables???

[ #40234 ]

I have a application written as CGI scripts that run under mod_perl mode via ModPerl::Registry or if anyone still uses it Apache::Registry. It also connects to a variety of databases, including Microsoft SQL Server via freetds.

Freetds can be controlled via a freetds.conf config file or environment variables.

I liked the idea of using the distros freetds libraries (actually, freetds contains the ct library, which is the only one that DBD::Sybase cares about) and i thought i could avoid the issues with me and everyone else writing to the freetds.conf file by using environment variables.

Which worked well until it ran in mod_perl

Then it died horribly

Turns out that controlling a C shared library via setting environment variables in perl is tricky in mod_perl

Just a note in case someone else tries configuring mod_perl to talk to SQL Server via environment variables

However, so long as you use the freetds.conf file, SQL Server and mod_perl get along fine... :)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.