Hi,
I've spent quite a bit of time experimenting and reading, but I am unable to make progress with configuring mod_perl on our server. Please bear with me, as I am a mathemtaics teacher, not a system guru by any means.
I am reading Paul Dubois's MySQL and Perl for the Web and I am stuck on page 74 where he gives configuration instructions for mod_perl.
Our installation is what came out of the can when we installed Red Hat 9.
[EMAIL PROTECTED] darnold]# /usr/sbin/apachectl -v Server version: Apache/2.0.40 Server built: Nov 27 2003 11:04:06
I followed Paul's advice and first tried:
[EMAIL PROTECTED] darnold]# /usr/sbin/httpd -l Compiled in modules: core.c prefork.c http_core.c mod_so.c
OK, I said that mod_perl must then be available only as a DSO. I found mod_perl.so on our system.
[EMAIL PROTECTED] darnold]# locate mod_perl.so /usr/lib/httpd/modules/mod_perl.so
I wondered about the version so I did a:
[EMAIL PROTECTED] darnold]# locate mod_perl
The last line of the output indicates our version of mod_perl.
/usr/share/doc/mod_perl-1.99_07/README
Now, I followed Paul's instructions, create a folder /var/www/cgi-perl with proper permissions, then and added these lines to httpd.conf:
LoadModule perl_module modules/mod_perl.so
Alias /cgi-perl/ "/var/www/cgi-perl/"
<Location /cgi-perl>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader on Options ExecCGI
</Location>
I restarted the server with:
[EMAIL PROTECTED] darnold]# /usr/sbin/apachectl restart [Wed Jun 09 13:41:20 2004] [warn] module perl_module is already loaded, skipping
Note the warning I received. When I comment out LoadModule perl_module modules/mod_perl.so above, this warning disappears. However, in either case (with LoadModule perl_module modules/mod_perl.so commented our uncommented), testing:
[EMAIL PROTECTED] darnold]# HEAD / HTTP/1.0 200 OK Content-Length: 904 Content-Type: text/html Last-Modified: Wed, 07 Jan 2004 22:29:37 GMT Client-Date: Wed, 09 Jun 2004 20:41:53 GMT
404 Not Found Connection: close Date: Wed, 09 Jun 2004 20:44:35 GMT Server: Apache/1.3.29 (Unix) PHP/4.3.4 Content-Type: text/html Client-Date: Wed, 09 Jun 2004 20:41:53 GMT Client-Response-Num: 1 X-Powered-By: PHP/4.3.4
This means that mod_perl is not running. I was expecting some message about mod_perl in the line: Server: Apache/1.3.29 (Unix) PHP/4.3.4.
So, my question. Can anyone help me with this problem? I would like to get mod_perl going with our existing structure, if possible avoiding complete installations of apache and mod_perl. Is there any simple thing I am missing here?
You are trying to use Apache 2.0 with mod_perl 2.0, things aren't the same, so parts of what you read in the book will not apply. You need to head to:
http://perl.apache.org/docs/2.0/user/intro/start_fast.html
and read how to setup mod_perl 2.0, if that's what you want. If you want to use mod_perl 1.0, then you need to install it and Apache 1.3.
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html