in reply to XML::Twig-parse() error under CGI

I am afraid this might be a mod_perl / Expat problem.

<mode type="cover_my_a**">XML::Twig does not modify the string in any way before it is sent to XML::Parser (or actually to XML::Parser::Expat).</mode>

That said I have never used XML::Twig under mod_perl and I am not familiar with what can go wrong when you do so.

What I know is that there are version conflicts between the version of Expat that comes with XML::Parser and the one that comes with Apache (yes Apache comes with Expat, and it is installed by default as a static library). The only way to be really sure that everything is fine is, IIRC, to first install the lastest Expat from sourceforge, then to install XML::Parser 2.30, then to recompile apache with Expat as a dynamic library. Instructions to do so can be found on Matt Seargeant's AxKit site at http://axkit.org/faq.xml. I can't say that's the problem, but I would definitely not rule it out. Try doing /path/to/apache/bin/httpd | grep -i XML and if you get any result then it might be the problem.

If this fails then post (or send me) the code.

Replies are listed 'Best First'.
Re: Re: XML::Twig-parse() error under CGI
by DrSax (Sexton) on May 25, 2001 at 19:03 UTC
    Michel,
    The error message I am getting shows that the Expat.pm is at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris-thread/XML/Parser/Expat.pm which is the precise path of the 2.30 version. Wouldn't that be indicative of the fact that I am not getting a different Expat via the WebServer?

    Also, I am being told that I am not running mod_perl in this case by those who administer the webserver here. I have to take that on faith because I have had little to do with the setup of our web environment, but I trust those who are saying it.

    One interesting fact is that after this error hits the browser the code works just fine. I'm glad that the code works (epecially the XML::Twig part, right?) but seeing the error is a concern.

    By the way, as you may recall in my former message to you, your recommendation was to set the handler on the higher level branch of the messages. The metric on that is that it takes about a minute to browse 2000 log entries, where it took about 10 seconds to only hit the exceptions. From my customer's point of view, it shouldn't be a problem, as the average daily log traffic will be more like 50 to 100 log entries.

    Let me know if you think of anything else, or have any other ideas. You have been a big help to me, Michel.

    Brian a.k.a. DrSax