At work (where I don't have root/sysadmin privilege nor much clout apparently with those that do), I'm trying to 'use' a module (DB_File) that was installed on my behalf in /local/perl5.8/lib in a cgi script that is served by:

SERVER_SOFTWARE="Oracle HTTP Server Powered by Apache/1.3.19 (Unix) mod_fastcgi/2.2.10 mod_perl/1.25 mod_oprocmgr/1.0"

Though I start the script with:

#!/local/perl5.8/bin/perl -w -I/local/perl5.8/lib/5.8.0

and DB_File is found, I get a '500 Internal Server Error' indicating that DB_File requires AutoLoader which in turn requires vars which, in the 5.00503 perl distribution, has a typo apparently:

Invalid [] range "a-Z" in transliteration operator at /oracle/iAS/1.0.2.2/Apache/perl/lib/5.00503/vars.pm line 17.
Compilation failed in require at /oracle/iAS/1.0.2.2/Apache/perl/lib/5.00503/AutoLoader.pm line 3.
BEGIN failed--compilation aborted at /oracle/iAS/1.0.2.2/Apache/perl/lib/5.00503/AutoLoader.pm line 3.
Compilation failed in require at /local/perl5.8/lib/5.8.0/sun4-solaris/DB_File.pm line 184.
BEGIN failed--compilation aborted at /local/perl5.8/lib/5.8.0/sun4-solaris/DB_File.pm line 184.
Compilation failed in require at /ncsa/cgi-bin/perlfect/search/test4.pl line 12.
BEGIN failed--compilation aborted at /ncsa/cgi-bin/perlfect/search/test4.pl line 12.
Thu Feb 20 16:49:11 2003 error client 127.0.0.1 Premature end of script headers: /ncsa/cgi-bin/perlfect/search/test4.pl

Here's the line from /oracle/iAS/1.0.2.2/Apache/perl/lib/5.00503/vars.pm:

if ($sym =~ tr/A-Za-Z_0-9//c) {

However, that the 5.00503 vars.pm has this invalid range, is sort of secondary to what I believe is the problem:

I can use or require by perl version choice only one level down; i.e., I get the perl5.8 DB_File (strangely the @INC of the version of perl that Apache starts with doesn't have it - in my search it seems to be standard or near core module or at least AnyDBM_File is) but get 5.00503 modules for any that are thus indirectly use-d or require-d.

I've tried various tacts to get a better vars.pm:

-require "/path to 5.8 libs/vars.pm";
- -I shell invocation parameter
-prepending 5.8 lib path to PERL5LIB ENV variable

to no avail. This is despite PERL5LIB and @INC set such that the 5.8 libs would be, and in the case of DB_File are, found. I don't know of another way that I can, as a user, modify how the web server looks for modules. I'm not sure if this is a mod_perl issue. I can look at the error logs and httpd.conf (there are Apache::Require lines there) but thus far haven't been able to get any server support types to help (maybe they don't know) beyond installing DB_File (and by dependence BerkeleyDB). I've suggested that someone just fix the typo but while I wait I've enlisted the help of your knowledge.

Your help is appreciated. Thanks.


In reply to module problem between perl and Apache by lintgrabber

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.