Hello mod_perl gurus, I am trying to do some xml parsing under mod_perl. My script basically looks like this:
#!/usr/bin/perl -w use strict; use CGI qw(:standard); use XML::Parser; use XML::SimpleObject; my $file="test.xml"; my $parser = XML::Parser->new(ErrorContext => 2, Style => "Tree"); my $xml = XML::SimpleObject->new($parser->parsefile($file)); # mod_perl killer print header(); ... When executed at command line and under handler cgi-script the script works fine. However, when run under mod_perl the Apache child segfaults with: [notice] child pid 16608 exit signal Segmentation fault (11) The problem occurs at line marked as the mod_perl killer when parser tries to parse $file. I have observed identical behavior under the following setups: [freeBSD] Apache/1.3.12 mod_perl/1.21 Perl 5.005_03 built for i386-freebsd [linux] Apache/1.3.19 mod_perl/1.24_01 Perl v5.6.0 built for i386-linux Searching through various mailing lists revealed there maybe conflicts w/ Apache's expat, with a solution being to recompile without it. Postings with this same problem date back to almost one year ago. Since my freeBSD setup is a "virtual private server" from verio I cannot easily recompile+reinstall apache. Please reply if you are aware of a fix for this problem or a workaround for parsing XML under mod_perl. (a fix that does not require apache recompilation would be ideal) Thanks, //Artem