I am currently working on a Windows XP platform that runs Tomcat 6 locally (for testing purposes) and Perl 5.8. I have a CGI script that connects to a DB2 database via DBI and runs some standard queries. The script executes without any errors from the command prompt and outputs the desired results within the command prompt. However, when running this same script from the browser I get the following error:

install_driver(DB2) failed: Can't load 'C:\Program Files(x86)\Perl\sit +e\lib\auto\DBD\DB2\DB2.dll' for module DBD::DB2: load_file:The specif +ied module could not be found at C:/Program Files(x86)/Perl/lib/DynaL +oader.pm line 230 at (eval 6) line 3 Compilation failed in require at (eval6) line 3. Perhaps a required shared library or dll isn't installed where expecte +d at C:\Developer\apache-tomcat-6.0.32\webapps\ROOT\WEB-INF\cgi\test. +cgi line 28

Right before line 230 in the DynaLoader.pm file this can be found:

#Many dynamic extension loading problems will appear to come from this section of code: XYZ failed at line 123 of DynaLoader.pm. Often these errors are actually occurring in the initialisation C code of the extension XS file. Perl reports the error as being in this perl code simply because this was the last perl code it executed.

...and line 230 reads:

my $libref = dl_load_file($file, $module->dl_load_flags) or croak(Can't load '$file' for module $module: ".dl_error());

I've never encountered this type of error before and would really appreciate some suggestions as this is somewhat of a time- sensitive project.


In reply to DynaLoader.pm line 230 error::install_driver(DB2) failed by perlPractioner

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.