Thanks. Working! Re: Re: RE: RE: DBI->Connect returning UNDEF in cgi but not in standalone prog

From: Sunil A.V. (sunilav_at_rediffmail.com)
Date: 03/22/05

  • Next message: Graeme St. Clair: "RE: DBI->Connect returning UNDEF in cgi but not in standalone pro g"
    Date: 22 Mar 2005 20:27:53 -0000
    To: "Reidy,Ron" <Ron.Reidy@arraybiopharma.com>
    
    

    Guys, Its working. Thanks all. special thanks to Reidy Ron and Bill Costa. The suggestion Ron gave was absolutely correct. There were a whole lot of env variables different/missing between the 2 environments. The one which finally made it work was $ENV{'TNS_ADMIN'} = '/var/opt/oracle/network/admin'; Thanks again, Sunil   On Wed, 23 Mar 2005 Sunil A.V. wrote : >As per Reidy, I printed $DBI::errstr and it turned out to be >"Error: ORA-12154: TNS:could not resolve service name (DBD ERROR: OCIServerAttach) at myapp_utility.pm" > >This probably means Oracle SID or instance name which is 'ledmyapp' is not being recognized and is not there in tnsnames.ora >But I confimed that tnsnames.ora has ledmyapp. Thats why standalone perl program worked from command line. > >So as per Ron and Bill, I also agree that environment variables might be incorrect. So I explicitly added >$ENV{'ORACLE_HOME'} = '/opt/oracle/product/9.2.0.6.0_64c'; >$ENV{'LD_LIBRARY_PATH'} = '/opt/oracle/product/9.2.0.6.0_64c/lib'; >$ENV{'ORACLE_SID'} = 'ledmyapp'; >$ENV{'PATH'} = $ENV{'PATH'}.":/opt/perl5/bin:/opt/oracle/product/9.2.0.6.0_64c/bin"; > >I printed them also to confirm that additions are being recognized. It is BUT STILL I AM GETTING THE SAME ERROR. >Do you think any other env variables might be missing OR is there a different way to set env vars for iPlanet web server perl cgi progs? > > > >On Wed, 23 Mar 2005 Bill.Costa@unh.edu wrote : > > > > Ron.Reidy@arraybiopharma.com recently wrote (in part): > > > > > The fact your code executes from the command line and not the web > > > server indicates either a permissions problme or an environment > > > problem. > > > > I'll second that environment problem observation. When something > > works from the command line but not as a CGI, that's one of the > > first things I check. Here's an ugly Perl script that might > > be of use in comparing the two environments. > > > > > > ...BC > > > >-- > >+----------------------------[ Bill.Costa@UNH.EDU ]---+ > >| Bill Costa | > >| CIS/TCS -- 1 Leavitt Lane PHONE: +1-603-862-3056 | No good deed... > >| University of New Hampshire | goes unpunished. > >| Durham, NH 03824 USA | > >| | > >+-----------------[ http://pubpages.unh.edu/~wfc/ ]---+


  • Next message: Graeme St. Clair: "RE: DBI->Connect returning UNDEF in cgi but not in standalone pro g"

    Relevant Pages

    • Re: Process Understanding
      ... | their environment, especially env variables. ... a web server startup is not a login shell. ...
      (Fedora)
    • Process Understanding
      ... their environment, especially env variables. ... and the other where the user has the following entry: ... the that one user has a bash shell while the other has no shell ...
      (Fedora)
    • Re: How do you create and set environment variables?
      ... You cannot change the invironment on already running process. ... The set of envirnoment variables can be only changed upon process creation. ... Once you compose the set of environment variables you start the new process ... "Ron Clarke" wrote in message ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: How do you create and set environment variables?
      ... > Hi Ron, ... > You cannot change the invironment on already running process. ... But you can modify its content. ... > When the process is up and running no one can change its environment ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: [9fans] Standalone unix port of the original rc shell
      ... needs "porting" to the sufficiently different but arguably UNIX-like ... environment. ... but i agree on everything else ron said. ... Prev by Date: ...
      (comp.os.plan9)