You are here: Foswiki>Tasks Web>Item1819 (08 Jun 2015, IngoKappler)Edit Attach

Item1819: undefined symbol: apreq_handle_apache2 when using mod_perl

Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: ModPerlEngineContrib
Branches: master
Reported By: IngoKappler
Waiting For:
Last Change By: IngoKappler
The following setup is used:
  1. mod_perl engine is activated
  2. template login is used
  3. ldap contrib is active for authentication

There is no problem with the login when using CGI. But when activating mod_perl all pages can be browsed but the login fails presenting a white empty screen. The error log holds this:

[Fri Jul 10 00:55:48 2009] [error] [client] Apache2::RequestIO::print: (104) Connection reset by peer at /path/to/foswiki/lib/Foswiki/Engine/ line 243, referer: https://hostname/foswiki/bin/login/Offices/Duesseldorf/WikiInstallationLdapNGPluginTests?origurl=/foswiki/Offices/Duesseldorf/WikiInstallationLdapNGPluginTests%3frefreshldap%3don%26refresh%3don
/usr/sbin/apache2: symbol lookup error: /usr/lib/perl5/auto/APR/Request/Apache2/ undefined symbol: apreq_handle_apache2

-- IngoKappler - 09 Jul 2009

Seems as if your apache is flawed. Which operating system is it? Which linux distro? Try ldd /usr/lib/perl5/auto/APR/Request/Apache2/ and watch out for any undefined symbol library.

-- MichaelDaum - 10 Jul 2009

Debian Linux alias Lenny.

ldd /usr/lib/perl5/auto/APR/Request/Apache2/ =>  (0xb7f22000) => /usr/lib/ (0xb7f0b000) => /usr/lib/ (0xb7eed000) => /usr/lib/ (0xb7ec1000) => /lib/ (0xb7ebd000) => /lib/i686/cmov/ (0xb7eb4000) => /lib/i686/cmov/ (0xb7e82000) => /lib/i686/cmov/ (0xb7e69000) => /lib/i686/cmov/ (0xb7e65000) => /lib/i686/cmov/ (0xb7d09000) => /usr/lib/ (0xb7cc6000) => /usr/lib/ (0xb7cb9000) => /usr/lib/ (0xb7b86000) => /usr/lib/ (0xb7b67000) => /usr/lib/ (0xb797b000) => /usr/lib/ (0xb790c000) => /usr/lib/ (0xb78e6000)
        /lib/ (0xb7f23000) => /lib/i686/cmov/ (0xb78d2000) => /usr/lib/ (0xb78bb000) => /usr/lib/ (0xb781d000) => /usr/lib/i686/cmov/ (0xb77d7000) => /usr/lib/i686/cmov/ (0xb7684000) => /usr/lib/ (0xb75f0000) => /lib/ (0xb75ed000) => /usr/lib/ (0xb75c2000) => /lib/i686/cmov/ (0xb75a9000) => /lib/i686/cmov/ (0xb7583000) => /usr/lib/ (0xb756e000) => /usr/lib/ (0xb755e000) => /usr/lib/ (0xb7559000) => /usr/lib/ (0xb74f1000) => /usr/lib/ (0xb74cd000) => /usr/lib/ (0xb74c5000) => /lib/ (0xb74c2000)

-- IngoKappler - 10 Jul 2009

Issue most probably isn't related to LdapContrib because when logging in while using normal CGI and afterwards switching to use mod_perl, the issue also occures when trying to save with an editor or to use preview from the raw editor. The error reamins thes same:

/usr/sbin/apache2: symbol lookup error: /usr/lib/perl5/auto/APR/Request/Apache2/ undefined symbol: apreq_handle_apache2
/usr/sbin/apache2: symbol lookup error: /usr/lib/perl5/auto/APR/Request/Apache2/ undefined symbol: apreq_handle_apache2
/usr/sbin/apache2: symbol lookup error: /usr/lib/perl5/auto/APR/Request/Apache2/ undefined symbol: apreq_handle_apache2

Now put the issue to ModPerlEngineContrib.

Oh, this doesn't look good indifferent, speechless :

root@wiki-ngm-test:/etc/apache2# ldd -r /usr/lib/perl5/auto/APR/Request/Apache2/ =>  (0xb7fbf000) => /usr/lib/ (0xb7fa8000) => /usr/lib/ (0xb7f8a000) => /usr/lib/ (0xb7f5e000) => /lib/ (0xb7f5a000) => /lib/i686/cmov/ (0xb7f51000) => /lib/i686/cmov/ (0xb7f1f000) => /lib/i686/cmov/ (0xb7f06000) => /lib/i686/cmov/ (0xb7f02000) => /lib/i686/cmov/ (0xb7da6000) => /usr/lib/ (0xb7d63000) => /usr/lib/ (0xb7d56000) => /usr/lib/ (0xb7c23000) => /usr/lib/ (0xb7c04000) => /usr/lib/ (0xb7a18000) => /usr/lib/ (0xb79a9000) => /usr/lib/ (0xb7983000)
        /lib/ (0xb7fc0000) => /lib/i686/cmov/ (0xb796f000) => /usr/lib/ (0xb7958000) => /usr/lib/ (0xb78ba000) => /usr/lib/i686/cmov/ (0xb7874000) => /usr/lib/i686/cmov/ (0xb7721000) => /usr/lib/ (0xb768d000) => /lib/ (0xb768a000) => /usr/lib/ (0xb765f000) => /lib/i686/cmov/ (0xb7646000) => /lib/i686/cmov/ (0xb7620000) => /usr/lib/ (0xb760b000) => /usr/lib/ (0xb75fb000) => /usr/lib/ (0xb75f6000) => /usr/lib/ (0xb758e000) => /usr/lib/ (0xb756a000) => /usr/lib/ (0xb7562000) => /lib/ (0xb755f000)
undefined symbol: Perl_get_sv   (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_Imarkstack_ptr_ptr       (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_Isv_yes_ptr      (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: modperl_xs_sv2request_rec     (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_call_list        (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_Istack_sp_ptr    (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_sv_2mortal       (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_vstringify       (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_form     (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_vcmp     (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_sv_setref_pv     (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_Iscopestack_ix_ptr       (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_newSV    (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: apreq_handle_apache2  (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_Iunitcheckav_ptr (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_Istack_base_ptr  (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_newSVpv  (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_new_version      (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_croak    (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_newXS    (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_sv_derived_from  (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_sv_2pv_flags     (/usr/lib/perl5/auto/APR/Request/Apache2/
undefined symbol: Perl_sv_magic (/usr/lib/perl5/auto/APR/Request/Apache2/

-- IngoKappler - 11 Jul 2009

Check if there is a link in /etc/apache2/mods-enabled pointing to /etc/apache2/mods-available/apreq.load and another pointing to /etc/apache2/mods-available/perl.load. If not, create them, restart apache and test if it works.

-- GilmarSantosJr - 11 Jul 2009

Thanks! smile Putting the link for apreq.load solved the issue. Looks like this should be added to the documentation for the ModPerlEngineContrib.

-- IngoKappler - 11 Jul 2009

yes, appropriate information should be added to the ModPerlEngineContrib documentation.

-- WillNorris - 16 Jul 2009

I plan to do that via subversion although it may take me a bit the first time.

-- IngoKappler - 23 Jul 2009

Good job, Ingo! smile

Just an observation: Apache2::Request is not required. It's recommended. The code try to use it, but if it's not available is used. It's already said in the Dependencies field, but it needs to be more explicit.

Feel free to update change history and version number in svn and release to

-- GilmarSantosJr - 28 Jul 2009

Hi Gilmar,

right it is listed in the dependencies. If you try using CGI in case Apache2::Request is not available why did it fail for me then, while I had not loaded the apreq module? Could there be an issue with the fallback or the apreq verification? Maybe the fallback normally works and only under special conditions fails? Because for me everything looked ok until I tried to login. I double checked now my CGI version which is 3.29. So as of now and from my personal point of view apreq was required not recommended (optional). Don't get me wrong wink , recommeded is most probably the correct definition and I now aligned the documentation change accordingly. I am just asking/trying to understand. smile

-- IngoKappler - 28 Jul 2009

Uh, finally delivered wink and closed.

-- IngoKappler - 23 Oct 2009
Topic revision: r19 - 08 Jun 2015, IngoKappler
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy