sns has asked for the wisdom of the Perl Monks concerning the following question:

I am using webmin and have developed a module to connect to database using DBI. It is working on one system and failing on the other.

The DBI->connect failing with OCIEnvNlsCreate error. I tried setting the trace on and found that it is not able to read the ORACLE_HOME variable.

Before making a call to DBI->connect, I printed the value of ENV{ORACLE_HOME} and correct value was printed.

In the trace log there is a section "Environment variables" which on the where it is working I see the values as in the %ENV of perl. On the system where it failes, the values are that of root shell environment. I donot understand why it is not reading the values of %ENV.

  • Comment on DBI->connect failing with OCIEnvNlsCreate error

Replies are listed 'Best First'.
Re: DBI->connect failing with OCIEnvNlsCreate error
by Old_Gray_Bear (Bishop) on Aug 22, 2013 at 18:17 UTC
    From your description of the problem, it sounds like the code is running under different User IDs on the different systems. Compare the environments on the two servers (UID, GUID, PATH, HOME, other bash() variables, etc) and resolve the discrepancies. (Cue the Muppets -- 'One Of These Systems Is Not Like the Other....').

    ----
    I Go Back to Sleep, Now.

    OGB