in reply to Re: Dynaloader library path
in thread Dynaloader library path

Thanks - I'm getting closer. If I set the LD_LIBRARY_PATH in the shell, things seem to work.

Problem is running it as a CGI, seems the the Apache environment isn't picking up the setting. I have a .profile and .bashrc setup, but no dice.

Setting the $ENV hash within the script doesn't seem to do the trick either. Any ideas? I'm about to just post to an .sh script which calls the perl script!

-Jim

Replies are listed 'Best First'.
Re^3: Dynaloader library path
by CountOrlok (Friar) on Feb 14, 2006 at 05:49 UTC
    In Apache, you can use the PassEnv directive to pass along particular environment variables to the httpd server, see http://httpd.apache.org/docs/2.0/mod/mod_env.html#passenv

    This ought to let your CGI scripts see the LD_LIBRARY_PATH env variable. The vairable has to be set in the shell starting the httpd process, so make sure your shell script that starts Apache has the variable set/exported, if it isn't already so.

    -imran

      Well, if I had access to the script that starts Apache (aka root), I'd have just installed the files in the global lib area, and been done with it :)

      Problem is, I don't have root on the machine, it's a hosted account. So I'm looking for a way to get the Path set and exported so the Dynaloader can see it. I was wondering if Apache looks at .profile, .bashrc, before running a CGI that might help me.

      -Jim
        You can also use the SetEnv directive. You can place this in a .htaccess file in the directory where your script resides.

        -imran