To use a wrapper script, you rename your Perl script then create a shell
script with the original name.  It can make any changes needed to the
environment before calling the original program with the original arguments.

As someone else pointed out, it is much better to get the system configured
correctly.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
----- Original Message -----
From: "Ajay Madan" <[EMAIL PROTECTED]>
To: "Michael A. Chase" <[EMAIL PROTECTED]>
Cc: "Booth, Tim" <[EMAIL PROTECTED]>; "DBI Mailing List"
<[EMAIL PROTECTED]>
Sent: Friday, June 08, 2001 05:03
Subject: Re: install_driver(Oracle) error when CGI pgm called by Webserver


>             I tried putting within the BEGIN block without any success, as
Michael has indicated.
> Actually, I am not clear what you exactly mean when you say "use a shell
wrapper". How can
> another script be called before the cgi, since the cgi itself is mentioned
in the HTML Form code.
>
> "Michael A. Chase" wrote:
>
> > Even putting the assignment to $ENV{LD_LIBRARY_PATH} in a BEGIN{} block
> > doesn't work for many UNIXes.  It tends to be cached by the dynamic
loader
> > before the script starts.  If you can't get it set properly by the
> > webserver, you will probably need to use a shell wrapper to set it
before
> > the script is called.
> > ----- Original Message -----
> > From: "Booth, Tim" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Cc: "DBI Mailing List" <[EMAIL PROTECTED]>
> > Sent: Friday, June 08, 2001 02:27
> > Subject: RE: install_driver(Oracle) error when CGI pgm called by
Webserver
> >
> > > Are you putting that line in a BEGIN{} block?  Otherwise, it won't
> > > help!
> > > > -----Original Message-----
> > > > From: Ajay Madan [SMTP:[EMAIL PROTECTED]]
> > > > Sent: Friday, June 08, 2001 10:20 AM
> > > > To: Hamilton, Andrew Mr RAYTHEON 5 SIG CMD
> > > > Cc: DBI Mailing List
> > > > Subject: Re: install_driver(Oracle) error when CGI pgm called by
> > > > Webserver
> > > >
> > > >         I tried doing what you suggested. But the CGI script just
seems
> > to
> > > > ignore
> > > > the setting, when it takes the connection to the DB. I am still able
to
> > > > execute
> > > > the same program from the command line but not able to do so thru
the
> > > > webserver.
> > > >
> > > > The following is the line of code to set the LD_LIBRARY_PATH in my
cgi
> > > > script:
> > > >
> > > > $ENV {'LD_LIBRARY_PATH'} =
> > > > '/usr/local/lib:/export/home/app/oracle/product/8.0.5/lib';
> > > >
> > > > Unable to understand, why I still get the same error?
> > > >
> > > > More help required please,
> > > >
> > > > "Hamilton, Andrew Mr RAYTHEON 5 SIG CMD" wrote:
> > > >
> > > > > Keep in mind your environment from your web browser is
considerably
> > > > > different from the one on the command line.  The user is typically
> > > > "nobody",
> > > > > a seriously unprivileged user.  Try setting the LD_LIBRARY_PATH
> > variable
> > > > > inside the cgi script.
> > > > >
> > > > > -----Original Message-----
> > > > > From: Ajay Madan [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Thursday, June 07, 2001 9:24 AM
> > > > > To: DBI Mailing List
> > > > > Subject: install_driver(Oracle) error when CGI pgm called by
Webserver
> > > > >
> > > > >         I have a CGI program written to connect to Database and
> > > > > execute/fetch data for the
> > > > > SQL - "Select tname from tab". It is a very simple program, which
when
> > > > > executed from
> > > > > command line works fine, but when I give a input on the HTML Form
and
> > > > when
> > > > > the same
> > > > > cgi is being called by the WebServer I get the following error:



Reply via email to