in reply to Re^2: mod_perl.so installed, not running?
in thread mod_perl.so installed, not running?

So you didn't see any of the environment variables such as gateway interface or server software? If that's the case then you might have your environment setup incorrectly.

I had purchased the "Oreilly Practical Mod_Perl" which helped immensely. Here is some of my httpd.conf referring to this subject. The last section is what you need to pay attention to I believe:
# MOD_Perl Section <Directory "/usr/local/apache/perllibrary"> AllowOverride None Options ExecCGI Order allow,deny Allow from All </Directory> + ScriptAlias /perl/ "/usr/local/apache/perllibrary/" + <IfModule mod_perl.c> + PerlRequire "/usr/local/apache/perllibrary/startup.pl" + <Location /perl> SetHandler perl-script PerlHandler Apache::Registry PerlSendHeader On </Location> . . .
Basically the startup.pl includes which modules I want to include and a couple of additional libraries I wanted to add. Stuff that we wrote for our application. The last part is what you need to pay attention to. If you don't have your environment setup properly then it won't work.

NOTE: I'm not an expert in the use of Mod_Perl. Never used it until just a few weeks ago. I know that I was able to (finally) get it working just fine. Running the test script provided proof that mod_perl was loaded and running. If you don't see the server software or mod_perl version then it's defintely not loading.

If it's still not working please post your setup. The section dealing with your /perl location specifically. (hope I didn't confuse you with all this. I'm still learning myself ::grinz::)

Replies are listed 'Best First'.
Re^4: mod_perl.so installed, not running?
by Anonymous Monk on Jul 29, 2004 at 13:31 UTC
    Okay, so I'm convinced mod_perl is not running. Can you help me get it started? Here's what I did. I first installed Apache2 with ./configure --prefix=/usr/local/apache2 --enable-info --enable-headers --enable-so --enable-speling --enable-ssl --enable-shared=perl. I recompilied and reinstalled after my first post adding the --enable-shared=perl pricisly because it wasn't working. Then I do make and make install. After that I try to install mod_perl with  perl Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs. Then make and make install. After that I added  LoadModule perl_module  modules/mod_perl.so to httpd.conf and I added
    <IfModule mod_perl.c> #Alias /perl/ /home/httpd/perl/ <Location /perl> SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI </Location> </IfModule>
    to httpd.conf as well. However there's no mod_perl.c when I type httpd -l so the above IfModule statement isn't doing much probably.....? Any ideas? Thanks for the help. P
      I'll certainly try to help. Just remember that I didn't get it working under Apache2. Hopefully someone who is more familiar with the workings of Apache2 will jump on in. Also, in 1.3.31 I setup up a static (not dynamic) apache server. So when I do http -l I see the module is loaded (I did that to help discover whether mod_perl was loaded or not). Perhaps you should try that with Apache2 just to make sure it's there (just a thought).

      When I compiled apache if I recall correctly, I had set up mod_perl first. Go through the INSTALL instructions and follow them step by step. Here is a sample of what I did:
       $ cd mod_perl-1.XX
       $ perl Makefile.PL \
           APACHE_SRC=../apache_1.3.X/src \
           DO_HTTPD=1 \
           USE_APACI=1 \
           PREP_HTTPD=1 \
           EVERYTHING=1 \
      
      After this I did a "make" followed by a "make install". I then did the following with apache:
      $ cd apache_1.3.X
      $ ./configure \
           --prefix=/path/to/install/of/apache \
           --activate-module=src/modules/perl/libperl.a \
           ...
      
      followed by a "make" then a "make install". I'm wondering if that's the problem. The module wasn't activated/copied so Apache can't find it/load it. Just a thought. You might to do a find/locate for mod_perl. See if it's copied anywhere.

      The above IfModule looks fine. Try rebuilding mod_perl/Apache. See if that helps.

      Btw, everything above is straight from the INSTALL instructions that came with mod_perl. It took me a few tries before I finally figured out what I was doing wrong. It works perfectly if the instructions are followed properly.

      One more thing that might help. This web site helped a great deal in learning how to get mod_perl working properly

      http://perl.apache.org/docs/index.html

      I highly recommend going through the docs especially the section on building everything. Now that I've succeeded in getting it working with 1.3.31, I'm thinking of finding a test system and building Apache 2 with mod_perl2. Which reminds me, make sure you are running mod_perl 2 with Apache 2. Otherwise it definitely will not work properly
Re^4: mod_perl.so installed, not running?
by Anonymous Monk on Aug 02, 2004 at 18:45 UTC
    Thanks for all your help. I've given up on Apache2 and reverted to Apache1 and mod_perl 1. I'm at least able to get that up and running. Now it's just a matter of reconfiguring everything else.... cheers.