You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "ODELL, TODD E (SWBT)" <to...@sbc.com> on 2002/08/23 03:47:59 UTC

RE: looks like mod_perl installed, but I can't execute perl scrip ts

Paul,
I'm rather new at this myself but I seem to remember something about the
Apache 2.0.40 not working with the mod_perl 1.99_04, due to a change in the
Apache API. So I wonder if to work with 2.0.39 you would really need the
mod_perl 1.99_04, rather than the *5? 
If you haven't already try one of the archive sites for the mailing list. I
use http://groups.yahoo.com/group/modperl/
<http://groups.yahoo.com/group/modperl/> . 
 
You might try adding the following to httpd.conf to see if you can get the
mod_perl status to show anything.
 
PerlModule Apache::Status
<Location /perl-status>
  SetHandler  perl-script
  PerlHandler  Apache::Status
  allow from all 
</Location>  

-----Original Message-----
From: Paul Barrette [mailto:paul@pbarrette.com]
Sent: Thursday, August 22, 2002 5:57 PM
To: modperl@perl.apache.org
Subject: looks like mod_perl installed, but I can't execute perl scripts


I'll admit I am not an expert at compiling from source. I have however, been
persistent and banging my head against the wall for several weeks.
I have finally decided to ask for help.
Forgive me for any list server faux paux as well as I am brand new at it.
 
Here is my configuration
 
I am running Redhat 7.3 on x86.
 
Apache, php then mod_perl have all been compiled and installed in that
order.
 
I have apache 2.0.39 compiled with the following configure options:
 
--enable-so
--enable-mods-shared=most
--with-mpm-prefork
 
I've also installed php 4.2.0 using
--with-apxs2=/usr/local/apache2/bin/apxs
--without-tsrm-pth
--enable-versioning
--enable-regex
--with-mysql
 
Finally I've installed mod-perl-1.99_05 as follows:
perl Makefile.PL  MP_AP_PREFIX=/usr/local/apache2 MP_INST_APACHE2=2
 
Everything works well EXCEPT perl.
 
There are no complaints when I startup apache, in fact the following message
can be seen in the error.log file:
Apache/2.0.39 (Unix) mod_perl/1.99_05-dev Perl/v5.6.1 DAV/2 PHP/4.2.0
configured -- resuming normal operations
 
I've added the following lines in httpd.conf:
__________________________________________

LoadModule perl_module        modules/mod_perl.so

#PerlModule Apache2
PerlRequire "/usr/local/apache2/perl/startup.pl"

Alias /perl /web/pbarrette.com/admin/

PerlModule Apache::Registry

<Location /perl>
SetHandler modperl
PerlHandler Apache::Registry
Options +ExecCGI
PerlSendHeader on
Allow from all
</Location>

______________________________________


 

my startup.pl script is as follows:

___________________________________________


use Apache2 ();
 
use lib qw(/web/pbarrette.com/admin);
 
# enable if the mod_perl 1.0 compatibility is needed
# use Apache::compat ();
use ModPerl::Util (); #for CORE::GLOBAL::exit
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::RequestUtil ();
 
use Apache::Server ();
use Apache::ServerUtil ();
use Apache::Connection ();
use Apache::Log ();
 
use APR::Table ();
 
use ModPerl::Registry ();
 
use Apache::Const -compile => ':common';
use APR::Const -compile => ':common';
 
1;
_______________________________________
I put a test perl script test.pl into the /web/pbarrette.com/admin
directory, enter the url in a browser but all I get is the text not
executed.
print "Content-type: text/html\n\n";
print "mod_perl rules!\n";
 
I have searched in a zillion places to see where I am going wrong and
suspect everything is OK but just that I do not know
how to properly enable mod_perl. Either that or I do not know where to put
perl scripts.
 
I have tried the latest build of apache-2.0.40 as well as php-4.2.2, but I
ran into so many problems trying to get them to compile that I decided to 
stick with the versions that I have.
 
Does anybody know what I am doing wrong?
 
Thanks,
Paul Barrette