I have emerged apache-1.3.29-r1 and mod_perl-1.27-r4 and apache refuses to recognize the mod_perl configuration directives like PerlRequire and PerlHandler. I haven't touched any configuration files and perl is an up to date, untouched version. Otherwise the install is virgin gentoo install with no custom packages. Kernel is 2.6.5-mm6. Reproducible: Always Steps to Reproduce: 1. emerge net-www/apache-1.3.29-r1 2. emerge dev-perl/mod_perl-1.27-r4 3. Add PerlRequire /path/to/script.pl 4. Start apache Actual Results: Apache refuses to start and claims that PerlRequire is an invalid configuration directive. Expected Results: Apache should have started, after executing the specified perl script.
What does it say in your log file? We need more information to troubleshoot this bug. Thanks chuck
It doesn't actualy add anything to my log file. When I try to start it with "/etc/init.d/apache start" the logfile is unchanged. However I get some output to the console saying "Syntax error on line 727 of /etc/apache/conf/commonapache.conf: Invalid command 'PerlModule', perhaps mis-spelled or defined by a module not included in the server configuration". All the doncumentation I can find specifiy no modules to be loaded through the conf files, nor can I find any files matching *perl* in my modules directory.
Usually when apache won't start you will find a message in /var/log/apache/error_log. Does your /etc/apache/conf/apache.conf load the mod_perl module? Seems almost like it is not being loaded. Also check to see if "-D PERL" is in your APACHE_OPTS in the /etc/conf.d/apache file. Not sure if that will help...
-D PERL in the conf.d file is for apache2 only. I tried it even so, and yeah, no luck.
But what does your error_log say? chuck
# tail /var/log/apache/error_log [Sun Apr 18 18:09:18 2004] [alert] mod_unique_id: unable to gethostbyname("riisholt") [Sun Apr 18 18:11:11 2004] [notice] Apache/1.3.29 (Unix) (Gentoo/Linux) configured -- resuming normal operations [Sun Apr 18 18:11:11 2004] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Sun Apr 18 18:11:11 2004] [notice] Accept mutex: sysvsem (Default: sysvsem) [Sun Apr 18 18:11:33 2004] [notice] caught SIGTERM, shutting down [Sun Apr 18 18:13:32 2004] [notice] Apache/1.3.29 (Unix) (Gentoo/Linux) configured -- resuming normal operations [Sun Apr 18 18:13:32 2004] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Sun Apr 18 18:13:32 2004] [notice] Accept mutex: sysvsem (Default: sysvsem) [Sun Apr 18 18:13:38 2004] [error] [client 127.0.0.1] File does not exist: /home/webroot/favicon.ico [Sun Apr 18 18:18:27 2004] [notice] caught SIGTERM, shutting down These are all messages from the last time I successfully started apache.
I just followed you instruction, and I can reproduce the problem. if you didn't did additionnal stuff, you cannot get it working, since you don't load the perl module. you should do : ebuild /var/tmp/portage/mod_perl-1.27-r4/build-info/mod_perl-1.27-r4.ebuild config then add -D PERL to APACHE_OPTS in /etc/conf.d/apache , like dstanek suggested.
That fixed it! Quite the PEBKAC problem I realize now. Thanks a bunch to all involved with helping me solve this (rather stupid) problem.