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

Hi,
I installed Active State Perl 5.10 32bit. It includes DBD::Oracle. I have Oracle installed and running on my machine and most of the path variables set correctly I think. Here is the error message I receive when tryingto use DBD:Oracle:

Can't load 'C:/Perl/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:%1 is not a valid Win32 application at C:/Perl/lib/DynaLoader.pm line 202. at \\emc-filer\etl\data\Jamaica\scripts\Modules\test1.pl line 7 Compilation failed in require at \\emc-filer\etl\data\Jamaica\scripts\Modules\test1.pl line 7. BEGIN failed--compilation aborted at \\emc-filer\etl\data\Jamaica\scripts\Modules\test1.pl line 7.

I included the path to the oci.dll ( C:\oracle\product\10.2.0\client_1\BIN) into my path variables, but that didn't help anything. I also made sure that .dll is in the folder. It is!
  • Comment on Active State Perl 5.10 32bit w/ DBD::Oracle included

Replies are listed 'Best First'.
Re: Active State Perl 5.10 32bit w/ DBD::Oracle included
by Anonymous Monk on Sep 19, 2008 at 07:32 UTC
    not a win32 application means the file is not a dll/exe, its either corrupt or the wrong file
Re: Active State Perl 5.10 32bit w/ DBD::Oracle included
by syphilis (Archbishop) on Sep 19, 2008 at 09:55 UTC
    %1 is not a valid Win32 application

    It's a pity that DynaLoader doesn't tell us exactly *which* file it is that's not a valid win32 application. One is tempted (by the error message) to assume that it's Perl/lib/auto/DBD/Oracle/Oracle.dll that's the offending file - and perhaps that is the case, here. But the problem could also be with some other dll that Perl/lib/auto/DBD/Oracle/Oracle.dll needs to load. It would be rare to find that a dll that has been installed as part of an ActivePerl installation is "not a valid Win32 application". I guess you could try re-installing ActivePerl over the top of the existing installation, and see if that changes anything.

    Which build of ActivePerl 5.10 do you have ? (Running perl -v will tell you.) Oracle is not visible to my 5.10.0 installation, so the error caused by the following attempt to load DBD::Oracle on my ActiveState build 1004 is not surprising:
    C:\_32>perl -MDBD::Oracle -e 1 Can't load 'C:/_32/ap1004/lib/auto/DBD/Oracle/Oracle.dll' for module D +BD::Oracle: load_file:The specified module could not be found at C:/_ +32/ap1004/lib/DynaLoader.pm line 202. at -e line 0 Compilation failed in require. BEGIN failed--compilation aborted.
    On the face of it, one might assume that it's telling me that C:/_32/ap1004/lib/auto/DBD/Oracle/Oracle.dll can't be found. But that's not so - "The specified module" in question is, in fact, oci.dll.

    You might get better mileage out of ActivePerl 5.8.8 (build 824). On that build of ActivePerl, DBD::Oracle loads fine for me:
    C:\_32>perl -MDBD::Oracle -e 1 C:\_32>
    Somehow (I'm not sure how) I have oci.dll in my ActivePerl 5.8.8 perl/bin folder. I'm assuming it shipped with ActivePerl ... but I could be wrong about that. I don't know why they would ship it with 5.8.8, but not 5.10.0. (Some licensing issue, perhaps ? )

    Cheers,
    Rob
      I don't think thats something Dynaloader can know because its a system error message. oci.dll should show up in the "event viewer"
        I don't think thats something Dynaloader can know because its a system error message

        Ok ... that seems plausible enough - assuming it's addressed to my opening remark.

        oci.dll should show up in the "event viewer"

        But I have no idea what one is supposed to deduce from that. (Far too cryptic for me to get my head around.)

        Cheers,
        Rob