in reply to Invalid Command 'PerlModule' perhaps misspelled or defined by a module not included in the server configuration

Did you compile mod_perl2 yourself or installed it via a package manager, i.e. apt/aptitude/... ? In the first case the FAQs mention that often people forget to 'make install' after 'make'.

Look for a file /usr/lib/apache2/modules/mod_perl.so. This seems to be the standard location on debian and probably also ubuntu to put the mod_perl binary. If not, search your installation for that file. Must be somewhere if you installed it

Check what the logfiles of apache2 tell you. Did it look for mod_perl and if yes where? If the logfiles don't tell you anything, there must be a file in /etc/apache2 where the module mod_perl.so is loaded, i.e. the line "LoadModule /<somepath>/mod_perl.so" must be somewhere and apache has to execute that line.

  • Comment on Re: Invalid Command 'PerlModule' perhaps misspelled or defined by a module not included in the server configuration

Replies are listed 'Best First'.
Re^2: Invalid Command 'PerlModule' perhaps misspelled or defined by a module not included in the server configuration
by ashrocks (Initiate) on Aug 18, 2010 at 19:23 UTC
    I installed mod_perl2 manually through a tar.gz file using wget and used commands, make make install. The usr/lib/apache2/modules does not have mod_perl.so file. Do i have to look into every file on apache2 directory for that line. But i guess i need to include it in httpd.conf file which seems to be blank.

      Just do 'make install' again, it should tell you where mod_perl.so gets stored. If not, enter this at the command line:

      find /usr -name 'mod_perl.so*' -print

      That should tell you the location of the file, if it is somewhere in /usr. If not, change /usr to / in above line, that will search your whole file system

      Normally the LoadModule line should be in the file /etc/apache2/mods-available/perl.load. There also should be a symbolic link in /etc/apache2/mods-enabled/ to this file. If that is the case, this file is executed automatically.

      If you don't find the line in there, try the following command:

      grep -r 'LoadMod' /etc/apache2

      This will tell you where that text is in any files below /etc/apache2.

      If that symbolic link is not in mods-enabled, add it and also add a symbolic link from perl.conf in mods-available. If you don't have the mods-* dirs, you should ask on an ubuntu list which file in /etc/apache2 is for local configurations. Often you can just add files into /etc/apache2/conf.d/ and they will be included automatically

        What would be a command to run mod_perl in apache. I used LoadModule but that seems to be already running. I'm trying to install RT.