Re: Culture shock

[prev] [thread] [next] [Date index for 2005/04/18]

From: Arshavir Grigorian
Subject: Re: Culture shock
Date: 13:42 on 18 Apr 2005
Dermot Paikkos wrote:
> Hi
> 
> I just installed a new server and started trying to port my old 
> scripts to it when i noticed things have changed and I am a bit 
> unsure of a few things. 
> 
> 1) rpm says that mod_perl 1.99 is installed but the httpd error_log 
> does mention mod_perl on restarts: Apache/2.0.52 (Fedora) configure - 
> resuming normal operations

Make sure you are loading the modperl DSO in your Apache configuration.

Something like this:

LoadModule perl_module modules/mod_perl.so

http://perl.apache.org/docs/2.0/devel/core/apache_integration.html#Enabling_the_mod_perl_Module_and_Installing_its_Callbacks

That said, RedHat (and other distributions for that matter) seem to 
always be behind in the versions of mod_perl that they ship. Since 
mod_perl is being constantly developed, you'd be better off getting the 
latest release from 
http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz and building it 
yourself.

> 2) Given the above, and the fact I have Apache::Const, 
> Apache::RequestRec..etc instead of Apache::Request and family 
> installed, am I now using mod_perl 2?
> 
> 3) configtest used to throw up perl errors but will now happily 
> report syntax ok even when i put some glaring typos in my scripts - 
> is that normal? Or is there something missing in my httpd.conf that I 
> need to add to get the scripts checked at apache restarts.

In order for Apache to test/load your Perl code on startup, you need to 
have startup file that loads all your (or other - e.g. CGI) modules, 
which you then tell Apache to execute when it starts up:

PerlRequire  /usr/local/apache2/conf/startup.pl

Check out:

http://perl.apache.org/docs/2.0/user/handlers/server.html#Startup_File

> At a guess I would say I am using mod_perl 2 and I need to put 
> something into the httpd to get 1 and 3 to work correctly but I don't 
> 
> know what. Can anyone advice me?
> 
> Thanx.
> Dp.


        -- 
        Arshavir Grigorian
Systems Administrator/Engineer
M-CAM, Inc.

Culture shock
Dermot Paikkos 13:20 on 18 Apr 2005

Re: Culture shock
Arshavir Grigorian 13:42 on 18 Apr 2005

Re: Culture shock
Dermot Paikkos 15:49 on 18 Apr 2005

Generated at 09:30 on 27 Apr 2005 by mariachi v0.52