in reply to Re^3: Having trouble trying to use DBD::Oracle with ActivePerl 5.8.8...
in thread Having trouble trying to use DBD::Oracle with ActivePerl 5.8.8...

Well, tried PPM area sync. Unfortunately it still didn't work after this. When I run this from the command prompt by typing in perl oracle_test.cgi I get a pop-up window that says, "This application has failed to start because OCI.dll was not found. Re-installing the application may fix this problem." After clicking OK it spits out the html for the error message I shared earlier. I'm not sure why it wouldn't be able to find that file because I have the following line at the top of my code $ENV{NLS_NCHAR}="UTF8"; $ENV{LD_LIBRARY_PATH} = "$ORACLE_LIB:$ENV{LD_LIBRARY_PATH}"; $ENV{ORACLE_HOME} = "$ORACLE_HOME"; where $ORACLE_HOME and $ORACLE_LIB define the paths to my Oracle directory. I read somewhere that you have to compile DBD-Oracle for a specific Oracle Client target. I saw this http://search.cpan.org/src/PYTHIAN/DBD-Oracle-1.22/README.win32.txt Is DBD-Oracle from ActiveState and trouchelle compiled for Oracle Instant Client 11.1.0.6.0 ? I am using Oracle Client 10.1.0g. Could this be my problem? Maybe I should try downloading a different version of Oracle Client? Or is there a way to tell what version a particular DBD-Oracle was compiled for?
  • Comment on Re^4: Having trouble trying to use DBD::Oracle with ActivePerl 5.8.8...

Replies are listed 'Best First'.
Re^5: Having trouble trying to use DBD::Oracle with ActivePerl 5.8.8...
by runrig (Abbot) on Aug 28, 2008 at 17:01 UTC
    Install msys, mingw, and nmake, and compile/install it yourself from source.

    Does your PATH include the directory where OCI.dll is? On Windows, I do not have any ORA_HOME or ORACLE_HOME or LD_LIBRARY_PATH set (though TNS_ADMIN is set), but PATH includes the directory where OCI.dll is, and the default DBD::Oracle that came w/ActiveState works fine.

      Ok, I finally found my error on this! Thanks to all who tried to help. I was requiring a file at the top of my code that had the following statement in it $ENV{"PATH"} = "";. This was effectively wiping out all my path information before I attempted to create a connection to the Oracle database. Strangely this exact same code works fine on a Linux OS. It seems the PATH environment variable is not as important there when trying to make a connection. I don't understand why. It seems like it should fail on both OS's but it doesn't. Thanks again for the help...

        Windows uses $ENV{PATH} for locating libraries while other systems use other environment variables, for example $ENV{LD_LIBRARY_PATH}.