You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Martin Gerdes <ma...@googlemail.com> on 2009/10/29 09:53:01 UTC

[users@httpd] Re: xml2enc does not appear to be functional with mod-proxy-html 3.1.2

I think I now know what is going wrong in principle:

>ldd -r /usr/lib/apache2/modules/mod_xml2enc.so
undefined symbol: ap_filter_flush
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_bucket_type_eos
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_bucket_type_flush
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: ap_strcasestr (/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: ap_register_output_filter_protocol
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_brigade_write
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: ap_pass_brigade
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_array_push
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: ap_regexec    (/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_brigade_create
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_brigade_partition
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_dynamic_fn_register
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_brigade_length
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_xlate_conv_buffer
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_pstrndup  (/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: ap_check_cmd_context
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: ap_add_output_filter
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_palloc    (/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_brigade_cleanup
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: ap_pregcomp   (/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: ap_fflush     (/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: xmlDetectCharEncoding
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: xmlGetCharEncodingName
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: xmlAddEncodingAlias
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_pstrdup   (/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: xmlParseCharEncoding
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: ap_remove_output_filter
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_pstrcat   (/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_brigade_flatten
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: ap_log_rerror (/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_array_make
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_optional_hook_get
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_xlate_open
(/usr/lib/apache2/modules/mod_xml2enc.so)
undefined symbol: apr_bucket_transient_create
(/usr/lib/apache2/modules/mod_xml2enc.so)
        linux-vdso.so.1 =>  (0x00007ffff61fe000)
        libc.so.6 => /lib/libc.so.6 (0x00007f32edc1e000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f32ee17b000)

If I understand the output correctly, the sybols provided by libxml2 are
undefined, and it does not depend on libxml2 as it should.
Furthermore, of the 3 referenced libraries, only libc.so.6 exists
(/lib/ld-linux-x86-64.so.2 does, but /lib64/ld-linux-x86-64.so.2 does not).

I did get warnings about the missing symbols when building the .deb package.
But I ignored them thinking that a used but undefined symbol would throw an
error somewhere along the line...!?

Not sure which of these problems is the decisive on, or how to solve them (I
do have package libxml2-dev installed, which defines all these symbols under
/usr/include/libxml2/, and contains /usr/lib/libxml2.so), but I will try to
get those symbols defined. Hopefully that will do it.

All help and suggestions appreciated.

Martin

2009/10/28 Martin Gerdes <ma...@googlemail.com>

> Background:
> I am running Apache as provided for Debian Lenny (2.2.9-10+lenny4) as
> a reverse proxy. To that end, I installed libapache2-mod-proxy-html
> (3.0.0-1) for URL rewriting.
> As the original content is in charset ISO-8859-1, I set the option
> "ProxyHTMLCharsetOut *" to get the webpage output as ISO-8859 instead
> of UTF-8.
>
> Everything worked just fine, except that a certain packet crashed the
> proxy-html module (Paket went into the proxy, no paket came out;
> according to the log, a process crashed at precisely that time...)
>
> I emailed the developer, who advised me to try the most recent version
> (3.1.2) for which unfortunately no debian package exists. So I spent
> half a day figuring out how to update the source debian archive with
> the most recent source code. I managed it, installed it, and it
> worked, and the module did not crash anymore. :-)
>
> However, after continuing to play around with mod-proxy-html I noticed
> that the output stays as utf-8 (having been converted from ISO-8859-1)
> instead of being converted back to ISO-8859-1.
> Note that 3.0.0 worked with precisely the same configuration (except
> that it did not need xml2enc).
> I am loading xml2enc, and mod-proxy-html notices that I do: If I
> comment the line "LoadModule xml2enc_module
> /usr/lib/apache2/modules/mod_xml2enc.so" out, I get Lines "[Wed Oct 28
> 10:42:04 2009] [warn] [client 192.168.0.9] No i18n support found.
> Install mod_xml2enc if required , referer: ...".
> Loading the module xml2enc, I am not getting error messages of any
> kind in the apache log file.
>
> If I turn on verbose Logging, and set log level to info, I get Lines
> "[Wed Oct 28 11:04:22 2009] [info] [client 192.168.0.9] H: matched
> /dwhfe/, substituting /testdwh/, referer: ...", "[Wed Oct 28 11:04:30
> 2009] [info] [client 192.168.0.9] No content-type; bailing out of
> proxy-html filter, referer: ..." and similar entries, so the logging
> works.
> However, if I grep the file for "charset" (cat
> /var/log/apache2/error.log | grep -i "charset") I don't get any
> matches, although according to the documention I should.
>
> I have tried changing the value of ProxyHTMLCharsetOut from * to
> ISO-8859-1, and to set "ProxyHTMLMeta On". No change.
>
> Unless I have compiled the module incorrectly (I have used the command
> "apxs2 -c -I/usr/include/libxml2 mod_xml2enc.c") I conclude that the
> output conversion just plainly is not working anymore.
>
> If I have compiled it incorrectly, I would appreciate being given the
> proper command to use, as I could not find any documentation to do so
> (thus I adjusted the command the debian module used to build
> mod_html_proxy).
>
> Any help or suggestions would be much appreciated. :-(
>
> Martin
>

Re: [users@httpd] Re: xml2enc does not appear to be functional with mod-proxy-html 3.1.2

Posted by Nick Kew <ni...@webthing.com>.
On 29 Oct 2009, at 08:53, Martin Gerdes wrote:

> I think I now know what is going wrong in principle:

There's nothing wrong with that: the symbols are resolved when you
LoadFile libxml2.so (just as the ap_ and apr_ symbols are resolved
by the apache core and apr being loaded).

> If I understand the output correctly, the sybols provided by libxml2  
> are undefined, and it does not depend on libxml2 as it should.
> Furthermore, of the 3 referenced libraries, only libc.so.6 exists (/ 
> lib/ld-linux-x86-64.so.2 does, but /lib64/ld-linux-x86-64.so.2 does  
> not).

If a required library is missing, the LoadModule will fail (and it  
means the
build is incompatible with your system, which is a problem I don't  
recollect
encountering in many years shipping binaries for one Linux distro built
on another distro).

> 2009/10/28 Martin Gerdes <ma...@googlemail.com>
> Background:
> I am running Apache as provided for Debian Lenny (2.2.9-10+lenny4) as
> a reverse proxy. To that end, I installed libapache2-mod-proxy-html
> (3.0.0-1) for URL rewriting.
> As the original content is in charset ISO-8859-1, I set the option
> "ProxyHTMLCharsetOut *" to get the webpage output as ISO-8859 instead
> of UTF-8.
>
> Everything worked just fine, except that a certain packet crashed the
> proxy-html module (Paket went into the proxy, no paket came out;
> according to the log, a process crashed at precisely that time...)
>
> I emailed the developer, who advised me to try the most recent version
> (3.1.2) for which unfortunately no debian package exists. So I spent
> half a day figuring out how to update the source debian archive with
> the most recent source code. I managed it, installed it, and it
> worked, and the module did not crash anymore. :-)

Hmmm,  I thought I advised getting me a test case that could reproduce
the crash, and your email on Oct 26th said the problem had gone.

> However, after continuing to play around with mod-proxy-html I noticed
> that the output stays as utf-8 (having been converted from ISO-8859-1)
> instead of being converted back to ISO-8859-1.
> Note that 3.0.0 worked with precisely the same configuration (except
> that it did not need xml2enc).

Precisely the same configuration would be incorrect.  You need to switch
from using apache's generic filter configuration to the new
ProxyHTMLEnable directive.  Hence the bold
Important Note: Configuration has changed:
on its front page.

But maybe you've found a docs bug, and I need to add the note
in more places, for existing users who don't check what you
already know about!  Where did you check?

-- 
Nick Kew