in reply to ODBC Cannot Connect

If you are using Apache as your webserver, you need to pass environment variables explicitly using the PassEnv directive.


No good deed goes unpunished. -- (attributed to) Oscar Wilde

Replies are listed 'Best First'.
Re^2: ODBC Cannot Connect
by roscomputing (Initiate) on Feb 02, 2006 at 02:50 UTC
    I am using Apache as my web server. Can you give a little more info on this? Do I pass the variables in the Perl script or the HTML that calls the script? And which environment variables do I pass? Is there perhaps a sample script of this that I can download and look at? Right now I'm thinking the cause of this problem as that my Perl script is being run as another user and does not have network security rights over the network. thanks, bill
Re^2: ODBC Cannot Connect
by ptum (Priest) on Feb 02, 2006 at 05:10 UTC

    I'm not at work, so I'll have to punt a little -- I'll fill in more detail when I get back in tomorrow. Basically, I think you will want to modify your httpd.conf file to explicitly pass the environment variables that you want to be available when you execute programs as the webuser (also defined in your httpd.conf). The link to PassEnv that I specified above shows the edited portion of the httpd.conf. Once you've changed httpd.conf, then you need to stop and restart Apache.

    Hmmm. Now that I look more closely at your original question, I see that you are on a Windows platform -- my experience is all on the Unix side. I had to look up what a Universal Naming Convention (UNC) path was. All this is to say that I may be leading you up a blind alley. If so, please accept my apologies, and perhaps someone who actually knows how to solve this problem will respond. :)

    Update: I modified Apache's httpd.conf file with the following Directory tag, passing $ENV{LD_LIBRARY_PATH} from webuser's profile to any script executed by the webserver:

    <Directory /> Options FollowSymLinks AllowOverride None PassEnv LD_LIBRARY_PATH PATH </Directory>

    Not sure if this will help you.