Yes of course I have perl installed. I even posted my output from perl -V (see output below). I wound up giving up on the static mod_perl and built it dynamically. I have it working...I think. I can get the httpd server to start, and it loads the perl_module as well as Apache::Session and Apache::DBI without complaining. When I try to access the page through a browser though, I get an "Internal Server Error" which usually happens when I have an error in the code (or at least, it happens on the machine that this is running on right now. I'm trying to move the code over to a newer machine...). At least httpd doesn't complain about the conf file when I start it up though, and at least it's not timing out when I access the page through a browser. I think I can get figure it out from here though. I'll stick with dynamic modperl for right now and see what the performance is like. If I need to, I'll make it static later. Thanks.

-Brandon


----- Original Message ----- From: "Maruthi Vara Prasad Chirravuri" <[EMAIL PROTECTED]>
To: "Brandon Mayes" <[EMAIL PROTECTED]>; <modperl@perl.apache.org>
Sent: Friday, October 14, 2005 12:33 AM
Subject: Re: I can't get mod_perl 2.0 working :(


Hi Brandon,

mod_perl : mod_perl-2.0.1
Apache   :  httpd-2.0.54

Do u have Perl Installed - Version 5.8.0 minimum or greater.

The actual building process is as follows : (1) APACHE (2) PERL (3) MOD_PERL

Plz don't extract all the tar.gz files at a stretch. Extract one after
the other. I mean, first extract httpd, build it and then extract
perl, build it and finally extract modperl.

So, First build Apache as follows : -

Extract in /usr/local/src and descend into the directory httpd-2.0.54

--prefix is the directory where u want to install apache. It is
recommeded that the directory where u want to install apache, install
modperl , install perl are all under one parent directory. So, create
a directory under /usr/local/src as apache2 and execute this command :
-

httpd-2.0.54# ./configure --prefix=/usr/local/src/apache2 --with-mpm=prefork

Ofcourse , make && make install later in httpd-2.0.54

Download PERL from http://cpan.org/src/ - perl - 5.8.0 or greater.

Next , Extract it and create a seperate directory in /usr/local/src as
"perl" and descend into the directory which u had extracted and
execute : -

/Configure -des -Dprefix=/usr/local/src/perl -Dusethreads

Execute make && make test && make install

Before proceeding with the installation of mod_perl 2.0, it's
advisable to install at
least the LWP package into your newly installed Perl distribution so
that you can
fully test mod_perl 2.0 later. You can use CPAN.pm to accomplish that:

/usr/local/src/perl/bin/perl -MCPAN -e 'install("LWP")'

This takes atleast 20 min. to finish and u r prompted for a set of
commands and other questions. Choose Default ( Press Enter for every
question ). If prompted about the website for CPAN, Enter it as :
http://cpan.org

Finally, Build MOD_PERL as follows : -

Extract the directory modperl-2.0.1 and descend into the directory and
execute : -

/usr/local/src/modperl-2.0.1# perl Makefile.PL
MP_AP_PREFIX=/usr/local/src/apache2

Now execute : make and then copy :

/usr/local/apache2/modules/mod_perl.so to /etc/httpd/modules and Enter
this line in httpd.conf

LoadModule perl_module modules/mod_perl.so

Now execute : make test and it should show u that " All tests successful "

Finally execute : make install

----END----

On 10/13/05, Brandon Mayes <[EMAIL PROTECTED]> wrote:
Hi everyone.  I've tried using google, and posting on forums, and no one
seems to have an answer for me.  Everything on google is all about using
apache 1.3 with mod_perl, and the stuff about 2.0 doesn't really give
detailed instructions about anything.  So hopefully someone on here can
help. Please note that I really want STATIC mod_perl...there will be quite
a few client connections hitting this box.  Here's the scoop on the box:

OS: RHEL 3 Advanced Server
mod_perl:   mod_perl-2.0.1
Apache:   httpd-2.0.54

--------------------------------------------------------------------------------------------------------------
[EMAIL PROTECTED] mod_perl-2.0.1]# rpm -qa | grep -i mysql
mysql-3.23.58-1
mysql-server-3.23.58-1
perl-DBD-MySQL-2.1021-3
libdbi-dbd-mysql-0.6.5-5
MySQL-python-0.9.1-6
mysql-devel-3.23.58-1
[EMAIL PROTECTED] mod_perl-2.0.1]# rpm -qa | grep -i dbi
libdbi-0.6.5-5
libdbi-dbd-mysql-0.6.5-5
perl-DBI-1.32-5

--------------------------------------------------------------------------------------------------------------
[EMAIL PROTECTED] mod_perl-2.0.1]# perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.4.21-1.1931.2.393.entsmp,
archname=i386-linux-thread-multi
    uname='linux por'
    config_args='-des -Doptimize=-O2 -g -pipe -march=i386 -mcpu=i686
-Dmyhostname=localhost [EMAIL PROTECTED] -Dcc=gcc -Dcf_by=Red Hat,
Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux
-Dvendorprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.0
-Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid
-Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog
-Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly
-Dpager=/usr/bin/less -isr'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef'
useithreads=define usemultiplicity=
    useperlio= d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=un uselongdouble=
    usemymalloc=, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='3.2.3 20030502 (Red Hat Linux 3.2.3-19)',
gccosandvers=''
gccversion='3.2.3 200305'
    intsize=o, longsize=s, ptrsize=l, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long'
k', ivsize=4'
ivtype, nvtype='double'
o_no', nvsize=, Off_t='', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='gcc'
l', ldflags =' -L/usr/local/lib'
ldflags_use'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
    perllibs=
    libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libper
    gnulibc_version='2.3.2'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so', d_dlsymun=undef, ccdlflags='-rdynamic
-Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE'
    cccdlflags='-fPIC'
ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5', lddlflags='s
Unicode/Normalize XS/A'


Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
  Locally applied patches:
        MAINT18379
  Built under linux
  Compiled at Sep 15 2003 10:03:52
  @INC:
    /usr/lib/perl5/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/5.8.0
    /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.0
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.0
    /usr/lib/perl5/vendor_perl
    /usr/lib/perl5/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/5.8.0
    .

--------------------------------------------------------------------------------------------------------------
[EMAIL PROTECTED] mod_perl-2.0.1]# perl -V:use5005threads -V:useithreads
-V:usemultiplicity
use5005threads='undef';
useithreads='define';
usemultiplicity='define';
(I know these are listed up above too...just easier to see here)

--------------------------------------------------------------------------------------------------------------
[EMAIL PROTECTED] mod_perl-2.0.1]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20)

--------------------------------------------------------------------------------------------------------------


Now here's what I've done thus far:

# perl -MCPAN -e shell (then I executed `install Bundle::Apache2` from cpan)

Downloaded the latest mod_perl-2.0.1 from perl.apache.org, and httpd-2.0.54
from httpd.apache.org. I put them in /usr/local/src and did the following:

# cd /usr/local/src
# tar -xzvf *.tar.gz
# cd mod_perl-2.0.1
# perl Makefile.PL MP_USE_STATIC=1 \
MP_AP_PREFIX=/usr/local/src/httpd-2.0.54 \
MP_AP_CONFIGURE="--with-mpm=prefork"
# make
# make install (this was all successful, and said it built mod_perl.a)
# cd ../httpd-2.0.54
# ./configure --prefix=/usr/bin/apache2
# make
# make install

Everything works now up to this point. But if I run `httpd -l` it does NOT
show mod_perl.c!  I edited the httpd.conf file and when I try to start the
server with that file, it complains about my line "LoadModule perl_module
modules/mod_perl.so" because mod_perl.so doesn't exist. If I comment that
line out, it later complains about my two lines that say:

PerlModule Apache::DBI
PerlModule Apache::Session


which makes sense. My question is, any idea why mod_perl.so isn't getting
built and placed into the /usr/bin/apache2/modules directory? It should be
there because I've configured mod_perl with the exact options the
installation manual says to on perl.apache.org AND I point it to the proper
apache src directory, so it should be passing in the proper options to
apache when I build that.

Here's what my httpd stuff looks like right now:

[EMAIL PROTECTED] mod_perl-2.0.1]# httpd -l
Compiled in modules:
  core.c
  mod_access.c
  mod_auth.c
  mod_include.c
  mod_log_config.c
  mod_env.c
  mod_setenvif.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_status.c
  mod_autoindex.c
  mod_asis.c
  mod_cgi.c
  mod_negotiation.c
  mod_dir.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_so.c

[EMAIL PROTECTED] mod_perl-2.0.1]# httpd -V
Server version: Apache/2.0.54
Server built:   Oct 11 2005 14:07:00
Server's Module Magic Number: 20020903:9
Architecture:   32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/usr/local/apache2"
-D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"




Am I missing a step here or something?  Or am I doing something I'm not
supposed to? If I remember correctly, to get this working with mod_perl 1.0
and apache1.3, one never actually compiled the stuff in the mod_perl
directory, but rather the configure script passed parameters to the httpd
src dir, and then when compiling httpd, it would link over to the modperl
stuff. It appears that I have to build mod_perl now. I'm not getting it to work either way though, so if anyone knows what's wrong, please let me know.
  I'm stumped!  Thanks in advance!

-Brandon

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


Reply via email to