You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Paul Barrette <pa...@pbarrette.com> on 2002/08/23 00:57:00 UTC

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






Re: looks like mod_perl installed, but I can't execute perl scripts

Posted by "Fabiàn R. Breschi" <fa...@computer.org>.
I had a similar problem running mod_perl with Oracle9i;

In my particular case, the solution was to declare the PERL5LIB env
variable both at the OS side and inside httpd.conf as follows on the
perl section: sentenv PERL5LIB [your PERL lib path]. Another issue was
resolved by passenv PERL5LIB.

Also, you migh check out the apache error_log if you get a good mod_per
start as per the installation manual.

One VERY important step is to check out (again and again) how you did
compile mod_perl as it may be tricky, as per the installation manual:
perl Makefile.PL
make && make test
make install
cd to apache_xx
make install

Finally, you can temporarily disable your startup.pl. I did this because
only had used it to persist the DB connection from Apache startup.

I have discovered that versioning is very impostant for it all. Can't
suggest you any of what Linux are since I'm on Solaris/Sparc. I had
tremendous problems using  Apache version 1.3.26 instead of  1.3.12 (!).

Good Luck.

Fabian.

Paul Barrette wrote:

> 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_modulemodules/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::exituse 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 knowhow 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 tostick with the versions that I have. Does anybody know what
> I am doing wrong? Thanks,Paul Barrette
>

Re: looks like mod_perl installed, but I can't execute perl scripts

Posted by "Jonathon M. Robison" <jo...@mhost.com>.
Souldn't it be:

LoadModule perl_module   libexec/libperl.so # Diff from yours

And then

AddModule mod_perl.c    # Non-existent in yours.

???

Make sure that your "Include ./perl.conf" is AFTER the above two lines. 
Oops, you don't use a perl.conf (I move ALL perl related configs to 
perl.conf and then Include it.) Make sure your PerlRequire is AFTER the 
above two lines in your httpd.conf.

In general I cheat and use the mod_perl distro to also do my apache and 
mod_ssl, with this:

perl Makefile.PL APACHE_PREFIX=/usr/local/apache  \
                  APACHE_SRC=../apache_1.3.26      \
                  EVERYTHING=1                     \
                  DO_HTTPD=1                       \
                  USE_APACI=1                      \
                  USE_DSO=1                        \
                  PREP_HTTPD=1                     \
                  SSL_BASE=/opt/ssl \#presumes you did "configure 

                                     #--with-apache=../apache_1.3.26"
                                     #in the mod_ssl src tree first.
                  APACI_ARGS=--enable-module=ssl

The PREP is important. It tells mod_perl to get apache ready, but NOT to 
compile and install it. This gives you time to make and install the 
mod_php into the apache src tree, and THEN do the make, etc. in the 
apache src tree. I am pretty sure that you could just ./configure php 
the same as you did ssl, then add "--enable-module=php" to the 
APACI_ARGS (seperating the two arguments by a comma), and then leave off 
the PREP, but you'd have to ask the PHP'ers on here for that one.

Anyhow, as you can see, I do everything from the mod_perl src tree.

Hope some of this helps.

--Jon Robison


Paul Barrette wrote:
> 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
>  
> 
>  
> 
>  
> 




Re: looks like mod_perl installed, but I can't execute perl scripts

Posted by Paul Barrette <pa...@pbarrette.com>.
Thanks for the tip Jon, you were correct about the AddHandler lines. I added
them and can now execute
scripts outside of cgi-bin.
Paul...
----- Original Message -----
From: "Jonathon M. Robison" <jo...@mhost.com>
To: "Paul Barrette" <pa...@pbarrette.com>
Cc: <mo...@perl.apache.org>
Sent: Saturday, August 24, 2002 9:19 AM
Subject: Re: looks like mod_perl installed, but I can't execute perl scripts


> To have that script execute OUTSIDE of the cgi-bin directory, or to use
> SSI,
>
> AddHandler cgi-script .pl
> AddHandler cgi-script .cgi
>
> If you have this line, I bet it only has the .pl one, and your script
> used a different extension than .pl, right?
>
> --Jon Robison
>
> Paul Barrette wrote:
> > Thanks everyone, I tried all of your suggestions and still no go.
> > Decided to give up on Apache 2 and started all over with 1.3.26.
> > After a couple of hours I finally had apache built with PHP and Perl and
> > then came the test.
> > Exactly the same thing occured. DAMN, DAMN, DAMN
> > Good news is that I knew immediately that my problem was not the
configuring
> > but something else. Had to be....
> > That got me to thinking about cgi-bin. Don't really understand that yet
(I
> > will soon) but somewhere in my reading I'd come accross it.
> > On a whim I put my script into that directory and I could hardly beleive
it
> > but it worked.
> > all of this time..... and that's what it was.
> > I'm sure the solution sounds pretty elementary to most of you, but
somehow
> > the importance of that directory escaped me.
> > Quickly ran it in Apache 2 and it was fine there too, so I'm in
business.
> >
> > I learned much through all of this and that is never bad.
> >
> > Anyway, I'm happy and thanks again for the quick response I recieved.
> > Paul Barrette
> >
> >
> > ----- Original Message -----
> > From: "Stas Bekman" <st...@stason.org>
> > To: "Paul Barrette" <pa...@pbarrette.com>
> > Cc: <mo...@perl.apache.org>
> > Sent: Thursday, August 22, 2002 9:01 PM
> > Subject: Re: looks like mod_perl installed, but I can't execute perl
scripts
> >
> >
> >
> >>Paul Barrette wrote:
> >>
> >>>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>
> >>
> >>if you want to use Apache::Registry from 1.x you need to add:
> >>
> >>use Apache::compat;
> >>
> >>at the top of your startup file
> >>
> >>Otherwise it's ModPerl::Registry.
> >>
> >>The rest looks fine.
> >>
> >>The 2.0 idiomatic registry section is:
> >>
> >><Location /perl>
> >>     SetHandler perl-script
> >>     PerlResponseHandler ModPerl::Registry
> >>     Options +ExecCGI
> >>     PerlOptions +ParseHeaders
> >></Location>
> >>
> >>__________________________________________________________________
> >>Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> >>http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> >>mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> >>http://modperlbook.org http://apache.org   http://ticketmaster.com
> >>
> >
> >
> >
>
>
>


Re: looks like mod_perl installed, but I can't execute perl scripts

Posted by "Jonathon M. Robison" <jo...@mhost.com>.
To have that script execute OUTSIDE of the cgi-bin directory, or to use 
SSI,

AddHandler cgi-script .pl
AddHandler cgi-script .cgi

If you have this line, I bet it only has the .pl one, and your script 
used a different extension than .pl, right?

--Jon Robison

Paul Barrette wrote:
> Thanks everyone, I tried all of your suggestions and still no go.
> Decided to give up on Apache 2 and started all over with 1.3.26.
> After a couple of hours I finally had apache built with PHP and Perl and
> then came the test.
> Exactly the same thing occured. DAMN, DAMN, DAMN
> Good news is that I knew immediately that my problem was not the configuring
> but something else. Had to be....
> That got me to thinking about cgi-bin. Don't really understand that yet (I
> will soon) but somewhere in my reading I'd come accross it.
> On a whim I put my script into that directory and I could hardly beleive it
> but it worked.
> all of this time..... and that's what it was.
> I'm sure the solution sounds pretty elementary to most of you, but somehow
> the importance of that directory escaped me.
> Quickly ran it in Apache 2 and it was fine there too, so I'm in business.
> 
> I learned much through all of this and that is never bad.
> 
> Anyway, I'm happy and thanks again for the quick response I recieved.
> Paul Barrette
> 
> 
> ----- Original Message -----
> From: "Stas Bekman" <st...@stason.org>
> To: "Paul Barrette" <pa...@pbarrette.com>
> Cc: <mo...@perl.apache.org>
> Sent: Thursday, August 22, 2002 9:01 PM
> Subject: Re: looks like mod_perl installed, but I can't execute perl scripts
> 
> 
> 
>>Paul Barrette wrote:
>>
>>>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>
>>
>>if you want to use Apache::Registry from 1.x you need to add:
>>
>>use Apache::compat;
>>
>>at the top of your startup file
>>
>>Otherwise it's ModPerl::Registry.
>>
>>The rest looks fine.
>>
>>The 2.0 idiomatic registry section is:
>>
>><Location /perl>
>>     SetHandler perl-script
>>     PerlResponseHandler ModPerl::Registry
>>     Options +ExecCGI
>>     PerlOptions +ParseHeaders
>></Location>
>>
>>__________________________________________________________________
>>Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
>>http://stason.org/     mod_perl Guide ---> http://perl.apache.org
>>mailto:stas@stason.org http://use.perl.org http://apacheweek.com
>>http://modperlbook.org http://apache.org   http://ticketmaster.com
>>
> 
> 
> 




Re: looks like mod_perl installed, but I can't execute perl scripts

Posted by Paul Barrette <pa...@pbarrette.com>.
Thanks everyone, I tried all of your suggestions and still no go.
Decided to give up on Apache 2 and started all over with 1.3.26.
After a couple of hours I finally had apache built with PHP and Perl and
then came the test.
Exactly the same thing occured. DAMN, DAMN, DAMN
Good news is that I knew immediately that my problem was not the configuring
but something else. Had to be....
That got me to thinking about cgi-bin. Don't really understand that yet (I
will soon) but somewhere in my reading I'd come accross it.
On a whim I put my script into that directory and I could hardly beleive it
but it worked.
all of this time..... and that's what it was.
I'm sure the solution sounds pretty elementary to most of you, but somehow
the importance of that directory escaped me.
Quickly ran it in Apache 2 and it was fine there too, so I'm in business.

I learned much through all of this and that is never bad.

Anyway, I'm happy and thanks again for the quick response I recieved.
Paul Barrette


----- Original Message -----
From: "Stas Bekman" <st...@stason.org>
To: "Paul Barrette" <pa...@pbarrette.com>
Cc: <mo...@perl.apache.org>
Sent: Thursday, August 22, 2002 9:01 PM
Subject: Re: looks like mod_perl installed, but I can't execute perl scripts


> Paul Barrette wrote:
> > 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>
>
> if you want to use Apache::Registry from 1.x you need to add:
>
> use Apache::compat;
>
> at the top of your startup file
>
> Otherwise it's ModPerl::Registry.
>
> The rest looks fine.
>
> The 2.0 idiomatic registry section is:
>
> <Location /perl>
>      SetHandler perl-script
>      PerlResponseHandler ModPerl::Registry
>      Options +ExecCGI
>      PerlOptions +ParseHeaders
> </Location>
>
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>


Re: looks like mod_perl installed, but I can't execute perl scripts

Posted by Stas Bekman <st...@stason.org>.
Paul Barrette wrote:
> 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>

if you want to use Apache::Registry from 1.x you need to add:

use Apache::compat;

at the top of your startup file

Otherwise it's ModPerl::Registry.

The rest looks fine.

The 2.0 idiomatic registry section is:

<Location /perl>
     SetHandler perl-script
     PerlResponseHandler ModPerl::Registry
     Options +ExecCGI
     PerlOptions +ParseHeaders
</Location>

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com