I suggest you post your segfaulting mod_perl program so that we can see if you're doing anything obviously wrong.

Segfaults with mod_perl are quite rare, in my experience. It's quite possible that you have some bad/mismatched packages. Fortunately, compiling your own apache/mod_perl/libapreq is pretty easy. Below are the steps I use for compiling - adjust as required:

Install prerequisites: autoconf automake bison flex gcc gcc-c++ make db db-devel db-utils zlib zlib-devel openssl openssl-devel ncftp lynx neon neon-devel libevent giflib giflib-devel libjpeg libjpeg-devel libpng libpng-devel libtiff libtiff-devel libxml2 libxml2-devel gzip bzip2 zlib zlib-devel Install CPAN modules: ExtUtils::XSBuilder Parse::RecDescent ====================================================== Get the source files ======================================================== export MPM="prefork" export SUFFIX="_${MPM}_perl_php" export CFLAGS="WHATEVER CFLAGS YOUR PROCESSOR SUPPORTS" cd ~ rm -Rf apache_and_friends mkdir -p apache_and_friends/packages cd apache_and_friends/packages # See http://httpd.apache.org/download.cgi wget http://apache.rediris.es/httpd/httpd-2.2.9.tar.gz # See http://perl.apache.org/download/index.html wget http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz # See http://httpd.apache.org/apreq/download.cgi wget http://apache.rediris.es/httpd/libapreq/libapreq2-2.08.tar.gz cd .. tar -xzf packages/httpd* tar -xzf packages/mod_perl* tar -xzf packages/libapreq* ====================================================== Setup Apache server ======================================================== export APACHE=`echo httpd*` echo "INSTALLING to /opt/$APACHE$SUFFIX" cd $APACHE # This sets up the apache binaries in /opt/httpd....... # with (eg) conf, htdocs etc in /opt/apache/ # adjust the options below for the environment that you want ./configure --prefix=/opt/$APACHE$SUFFIX \ --localstatedir=/opt/apache \ --sysconfdir=/opt/apache/conf \ --datadir=/opt/apache \ --with-mpm=$MPM\ --enable-cache=shared\ --enable-deflate=shared\ --enable-disk-cache=shared\ --enable-file-cache=shared\ --enable-info=shared\ --enable-mem-cache=shared\ --enable-rewrite=shared\ --enable-dav=shared\ --enable-auth-digest\ --enable-ssl=shared\ --enable-expires=shared\ --enable-unique-id=shared\ --enable-usertrack=shared make rm -Rf /opt/$APACHE$SUFFIX make install cd .. ====================================================== Setup mod_perl ======================================================== cd mod_perl-* perl Makefile.PL \ MP_AP_PREFIX=/opt/$APACHE$SUFFIX \ MP_COMPAT_1X=0 make make test && make install && cd .. ====================================================== Setup libapreq ======================================================== cd libapreq* perl Makefile.PL --with-apache2-apxs=/opt/$APACHE$SUFFIX/bin/apxs make && make test && make install cd .. ######################################################## ln -fs /opt/$APACHE$SUFFIX/* /opt/apache ln -sf /opt/apache/bin/apachectl /usr/bin/apachectl ln -sf /opt/apache/bin/apachectl /etc/rc.d/httpd chkconfig httpd on groupadd -r apache useradd -r apache -g apache

In reply to Re: Getting started with mod_perl by clinton
in thread Getting started with mod_perl by John M. Dlugosz

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.