I have an existing website that was (until recently) running with mod_perl under Apache 1.3.x, and worked well.

I've migrated the servers to newer hardware and Apache 2..x, and had to "unroll" the site, because none of the same/similar constructs that worked with mod_perl worked with mod_perl2 (even the fallback of using Apache2::compat didn't seem to work.

Right now, I'm using the following:

#!/usr/bin/perl -w use strict; use diagnostics; use Apache2::Request; my $apr = Apache2::Request->new($r); $action = $apr->param('a');

This is currently taking the place of my previous $cgi->param('a') constructs. As I get more familiar with the Apache2::Request objects and methods, I'll add more of my code in.

Right now, its baby steps.

When I request the page using this code (with or without params), I receive:

perl: symbol lookup error: /usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so: undefined symbol: modperl_xs_sv2request_rec

There is no other line number, error or warning.

I've Googled around without much luck. Lots of people with the error on BSD platforms, but I run Linux, and am using the upstream Debian Apache and libapreq2 packages.

Where other rock can I overturn to figure this out?

Update: I fetched the upstream source for libapreq2 and built it with the following params:

/usr/bin/perl Makefile.PL --with-apache2-apxs=/usr/bin/apxs2 --prefix=/usr --enable-perl-glue --with-perl=/usr/bin/perl

This compiles clean and all tests pass 100%, but I still receive the error above.


In reply to Static CGI.pm to mod_perl2 (not mod_perl) by hacker

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.