in reply to PATH is not setting - PERL

Silly question, but are you running this Perl script and then running your application? Or are you running this Perl script which then executes your application?

Any changes you make to the environment in one process is only active for that process and its own subsequently forked/executed processes. It will NOT affect the shell that invoked your script.

Update: Sinistral, yours is one valid interpretation, and I doubt you can be sure from the Oracle tools he mentions that he's using it correctly. This is an area which has a lot of possible and common mistakes. As far as when to set LD_LIBRARY_PATH, this too should be possible on most platforms within the Perl script's process, as long as it's done early enough. For example, a BEGIN{} may be required before a certain use statement. Of course, there may be other hangups with a given httpd and perlmod that I won't explore today.

--
[ e d @ h a l l e y . c c ]

Replies are listed 'Best First'.
Re^2: PATH is not setting - PERL
by Sinistral (Monsignor) on Oct 15, 2007 at 13:42 UTC

    The original poster is saying that the Perl code is his application. He's using the Oracle Instant Client as the source for the libraries needed by DBD::Oracle.

    The answer to the problem is that you have to set then LD_LIBRARY_PATH before invoking the Perl script. You can do this by using a shell script to call your Perl script, by setting environment variables manually, or, if the Perl script is a CGI script invoked by Apache, using the SetEnv directive in the httpd.conf.