cvs commit: modperl-2.0/t/filter/TestFilter api.pm
dougm 01/06/23 10:47:32 Modified:t/filter/TestFilter api.pm Log: TestFilter::api needs to untie *STDOUT; else tests run after it fail Revision ChangesPath 1.4 +6 -0 modperl-2.0/t/filter/TestFilter/api.pm Index: api.pm === RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/api.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- api.pm2001/04/20 01:57:26 1.3 +++ api.pm2001/06/23 17:47:31 1.4 @@ -20,6 +20,10 @@ $Test::ntest = 1; } +#XXX: else pp_untie complains: +#untie attempted while %d inner references still exist +sub Apache::Filter::UNTIE {} + sub handler { my $filter = shift; @@ -44,6 +48,8 @@ ok $r-isa('Apache::RequestRec'); ok $r-uri eq '/' . __PACKAGE__; + +untie *STDOUT; 0; }
Configuring httpd.conf to recognize mod_perl
Hi guys: I installed ActivePerl and ran the *.ppd file to install mod_perl. i got these errors though: -- Writing D:\serv\lang\site\lib\auto\mod_perl\.packlistCannot find file 'perl' (or one of its components). Check toensure the path and filename are correct and that all requiredlibraries are available.Cannot find file 'perl' (or one of its components). Check toensure the path and filename are correct and that all requiredlibraries are available.-- This is the only part that failed and according to one of the threads in the achives (http://www.mail-archive.com/modperl@apache.org/msg18596.html) All i had to was copy the "mod_perl.so" into my apache/modules directory and it would be ok. Soall i need to know now is how do i make apache recognize this new module? what do i need to add or change in the httpd.conf file? do i have to make any other changes anywhere else? thanx !
server tokens
is there any way to access the server tokens in mp 1.24? i'd like to use them at server startup time.
Re: server tokens
On Sat, 23 Jun 2001, brian moseley wrote: is there any way to access the server tokens in mp 1.24? i'd like to use them at server startup time. You have to use XS. AxKit does it this way. I'd paste the code here but it's a bit all over the place, so you'd be easier to just download it. -- Matt/ /||** Founder and CTO ** ** http://axkit.com/ ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** mod_perl news and resources: http://take23.org ** \\// //\\ // \\
Re: SSI advocacy Was:: Multiple AddHandler statements
At 12:35 22.06.2001 -0400, you wrote: 1. SSI with XBitHack full plays the 304 game for me. Every time the catalog database is updated, its SSI frame gets a touch. Thats it. Simple. Efficient. Most of the perl templating systems would be just as good on these points, Including If-Modified-Since - 304 responding? In fact my main objection to the majority of templating systems is that they are frameworks. I am using a homegrown template engine at the moment and probably would be using template toolkit if I started now, but I definitely hate to be framed at work:) Another point for SSI is that lots of people understand them. Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: Configuring httpd.conf to recognize mod_perl
On Sat, 23 Jun 2001, Francisco Castellon wrote: Hi guys: I installed ActivePerl and ran the *.ppd file to install mod_perl. i got these errors though: -- Writing D:\serv\lang\site\lib\auto\mod_perl\.packlist Cannot find file 'perl' (or one of its components). Check to ensure the path and filename are correct and that all required libraries are available. Cannot find file 'perl' (or one of its components). Check to ensure the path and filename are correct and that all required libraries are available. -- Is Perl in your PATH when you're installing this? This is the only part that failed and according to one of the threads in the achives (http://www.mail-archive.com/modperl@apache.org/msg18596.html) All i had to was copy the mod_perl.so into my apache/modules directory and it would be ok. So all i need to know now is how do i make apache recognize this new module? what do i need to add or change in the httpd.conf file? do i have to make any other changes anywhere else? thanx ! At http://theoryx5.uwinnipeg.ca/ppmpackages/httpd.conf-perl there's a sample Apache httpd.conf file for Win32 mod_perl/mod_ssl. Basically, to get started you need to load it: LoadModule perl_module modules/mod_perl.so This file then gives some examples of using Apache::Registry, HTML::Embperl, Apache::ASP, and HTML::Mason in this environment. Also, check http://perl.apache.org/, especially the mod_perl guide, and http://take23.org/, for further information. best regards, randy kobes
Re: server tokens
On Fri, 22 Jun 2001, Matt Sergeant wrote: On Sat, 23 Jun 2001, brian moseley wrote: is there any way to access the server tokens in mp 1.24? i'd like to use them at server startup time. You have to use XS. AxKit does it this way. I'd paste the code here but it's a bit all over the place, so you'd be easier to just download it. oh, it's not really that important, don't want to add a bunch of extra stuff to my build. thanks tho. pals: consider this a feature request for the core :)
Segmentation Fault (11)
I am getting the following messages in my back-end apache install logfile (the one that handles perl scripts using mod_perl and PerlRun)... [17:03:49 2001] [notice] child pid 15064 exit signal Segmentation Fault (11) [17:04:27 2001] [notice] child pid 17127 exit signal Segmentation Fault (11) [17:04:55 2001] [notice] child pid 15065 exit signal Segmentation Fault (11) [17:05:06 2001] [notice] child pid 17102 exit signal Segmentation Fault (11) I am running... Apache: 1.3.19 (for both front-end and back-end) mod_perl: 1.25 perl: 5.005_03 The httpd processes can last for about 10 minutes before they all die off and get respawned. Any ideas on where I should start looking to debug this problem? Thanks!
which perl?
Hi, I am running Apache/1.3.14 (Unix) mod_perl/1.25 on a redhat 7 system. Since the perl binary that came with the redhat distribution was version 5.6.0, I assumed that is the version that got built into mod perl (statically linked). But I just discovered using perl's $] variable, that it's actually using 5.006! So far as I can tell, I don't even have a copy of perl 5.006 on my system... Is mod_perl actulaly distributed with a version of perl interpreter intact? If so, How do I upgrade it? thanks, Todd Goldenbaum [EMAIL PROTECTED]
Re: which perl?
I am running Apache/1.3.14 (Unix) mod_perl/1.25 on a redhat 7 system. Since the perl binary that came with the redhat distribution was version 5.6.0, I assumed that is the version that got built into mod perl (statically linked). But I just discovered using perl's $] variable, that it's actually using 5.006! So far as I can tell, I don't even have a copy of perl 5.006 on my system... Is mod_perl actulaly distributed with a version of perl interpreter intact? If so, How do I upgrade it? For the amount of time it takes, I'd suggest just building a local copy of mod_perl. If you use a .makepl_args.mod_perl file it can be done with a single perl Makefile.PL; make test install.
Re: which perl?
On Sat, 23 Jun 2001, Steven Lembark wrote: I am running Apache/1.3.14 (Unix) mod_perl/1.25 on a redhat 7 system. Since the perl binary that came with the redhat distribution was version 5.6.0, I assumed that is the version that got built into mod perl (statically linked). But I just discovered using perl's $] variable, that it's actually using 5.006! So far as I can tell, I don't even have a copy of perl 5.006 on my system... Is mod_perl actulaly distributed with a version of perl interpreter intact? If so, How do I upgrade it? For the amount of time it takes, I'd suggest just building a local copy of mod_perl. If you use a .makepl_args.mod_perl file it can be done with a single perl Makefile.PL; make test install. Hm, I'm still unclear about whether mod_perl actually gets distributed with its own version of the perl interpreter, etc. Plus I've never used .makrpl_args.mod_perl, no idea where to start with that one... isn't there another way?
Re: which perl?
On Sat, 23 Jun 2001, Todd Goldenbaum wrote: Hi, I am running Apache/1.3.14 (Unix) mod_perl/1.25 on a redhat 7 system. Since the perl binary that came with the redhat distribution was version 5.6.0, I assumed that is the version that got built into mod perl (statically linked). But I just discovered using perl's $] variable, that it's actually using 5.006! So far as I can tell, I don't even have a copy of perl 5.006 on my system... Is mod_perl actulaly distributed with a version of perl interpreter intact? If so, How do I upgrade it? Ummm 5.006 _is_ 5.6.0, just in the old perl numbering scheme. ctriv@quartz:~$ perl -v This is perl, v5.6.1 built for sun4-solaris ctriv@quartz:~$ perl -e 'print $]\n' 5.006001 You should look at something like this (or it's sprintf equivalent). ctriv@quartz:~$ perl -e 'printf(%vd\n, $^V)' 5.6.1 Chris R. -- Chris Reinhardt [EMAIL PROTECTED] Webmaster Dynamic DNS Network Services http://www.dyndns.org/
Directory Restrictions
Hello I've been working on a mod_perl implimentation which does the following. New users gain access to a directory, but can not get access to two directories underneath it. After logging in and receiving a cookie, they are automatically shunted to one of the two low directories. I've had some unexpected difficulty with the images of the html files. I have something like this running on the top directory: sub handler{ my $r = shift; return DECLINED if ($r-uri() =~ /top/home.html); return DECLINED if ($r-uri() =~ /top/login.html); return DECLINED if ($r-uri() =~ /top/lower_dir1); return DECLINED if ($r-uri() =~ /top/lower_dir2); return DECLINED if (!$r-content_type('text/html)); return DECLINED if ($r-content_type('images/gif)); My problem is that they can still see the directory index. I need It's doing an internal redirect when they are autorized for on of the lower directories, but the graphics are still now getting through to the top if I remove the DECLINED content_type 'text/html'. But when I leave it in, they seem to have access to the directory access. Ruben
Re: Segmentation Fault (11)
On Sat, 23 Jun 2001, Douglas C. Heestand wrote: I am getting the following messages in my back-end apache install logfile (the one that handles perl scripts using mod_perl and PerlRun)... [17:03:49 2001] [notice] child pid 15064 exit signal Segmentation Fault (11) [17:04:27 2001] [notice] child pid 17127 exit signal Segmentation Fault (11) [17:04:55 2001] [notice] child pid 15065 exit signal Segmentation Fault (11) [17:05:06 2001] [notice] child pid 17102 exit signal Segmentation Fault (11) I am running... Apache: 1.3.19 (for both front-end and back-end) mod_perl: 1.25 perl: 5.005_03 The httpd processes can last for about 10 minutes before they all die off and get respawned. Any ideas on where I should start looking to debug this problem? You will find SUPPORT file in the mod_perl source distro. Follow the intructions in this file. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
SSI Lost with Mod Perl?
I've seemed to have lost my ability to use SSI whenI use the content handlers with Mod_perl. Is there anyway I can fix this? Ruben
Re: SSI Lost with Mod Perl?
I've seemed to have lost my ability to use SSI whenI use the content handlers with Mod_perl. Is there anyway I can fix this? Can you be more specific about what you're trying to do? You can still use mod_include with mod_perl installed, and you can use Apache::SSI either alone or as a filter with Apache::Filter. Does that help? - Perrin (P.S. I'm in Brooklyn too!)
Re: which perl?
On Sat, 23 Jun 2001, Chris Reinhardt wrote: On Sat, 23 Jun 2001, Todd Goldenbaum wrote: Hi, I am running Apache/1.3.14 (Unix) mod_perl/1.25 on a redhat 7 system. Since the perl binary that came with the redhat distribution was version 5.6.0, I assumed that is the version that got built into mod perl (statically linked). But I just discovered using perl's $] variable, that it's actually using 5.006! So far as I can tell, I don't even have a copy of perl 5.006 on my system... Is mod_perl actulaly distributed with a version of perl interpreter intact? If so, How do I upgrade it? Ummm 5.006 _is_ 5.6.0, just in the old perl numbering scheme. how strange. ctriv@quartz:~$ perl -v This is perl, v5.6.1 built for sun4-solaris ctriv@quartz:~$ perl -e 'print $]\n' 5.006001 You should look at something like this (or it's sprintf equivalent). ctriv@quartz:~$ perl -e 'printf(%vd\n, $^V)' 5.6.1 gotcha. so it's 5.6.0... however i'm still really curious about whether mod_perl 'builds in' the interpreter when you build apache, or is it when you run apache? what i'm actually trying to do is get mod_perl to use a different version of perl also installed on my system, 5.6.1, so as to settle some problems within mason causing the httpd child processes to segfault.
Re: which perl?
It's got to be built in. My mod_perl conf keeps looking in 5.6.0 in the @INC array even after the 5.6.1 upgrade which was more or less forced on me by cpan. It kind of ticks me off those guys who install modules on CPAN which upgrade by damn perl. NET::FTP of libnet is a big culprit of this. Ruben gotcha. so it's 5.6.0... however i'm still really curious about whether mod_perl 'builds in' the interpreter when you build apache, or is it when you run apache? what i'm actually trying to do is get mod_perl to use a different version of perl also installed on my system, 5.6.1, so as to settle some problems within mason causing the httpd child processes to segfault.
Re: which perl?
It's got to be built in. My mod_perl conf keeps looking in 5.6.0 in the @INC array even after the 5.6.1 upgrade Rebuild mod_perl or add the 5.6.1 paths to @INC in startup.pl via use lib: http://perl.apache.org/guide/install.html#Should_I_Rebuild_mod_perl_if_I_h which was more or less forced on me by cpan. Yeah, it's a known bug, has been fixed lately. It kind of ticks me off those guys who install modules on CPAN which upgrade by damn perl. Configure CPAN.pm to 'ask' rather than 'follow'. I was aborting the fetch of 5.6.1 manually by punching Ctrl-C a few times. NET::FTP of libnet is a big culprit of this. Ruben gotcha. so it's 5.6.0... however i'm still really curious about whether mod_perl 'builds in' the interpreter when you build apache, or is it when you run apache? what i'm actually trying to do is get mod_perl to use a different version of perl also installed on my system, 5.6.1, so as to settle some problems within mason causing the httpd child processes to segfault. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: which perl?
It's got to be built in. My mod_perl conf keeps looking in 5.6.0 in the @INC array even after the 5.6.1 upgrade I got sick of the problem and linked 5.6.1 into 5.6.0 Ruben
Re: SSI Lost with Mod Perl?
Will it work by default or do I need to chain it somehow? Ruben I've seemed to have lost my ability to use SSI whenI use the content handlers with Mod_perl. Is there anyway I can fix this? Can you be more specific about what you're trying to do? You can still use mod_include with mod_perl installed, and you can use Apache::SSI either alone or as a filter with Apache::Filter. Does that help? - Perrin (P.S. I'm in Brooklyn too!)
Re: which perl?
On Sun, 24 Jun 2001, Brooklyn Linux Solutions CEO wrote: It's got to be built in. My mod_perl conf keeps looking in 5.6.0 in the @INC array even after the 5.6.1 upgrade I got sick of the problem and linked 5.6.1 into 5.6.0 You could achieve the same with: startup.pl: --- use lib qw(/usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1); note that lib.pm takes care of adding the arch lib paths (i686-linux on my machine) and removing dups. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: which perl?
use lib qw(/usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1); note that lib.pm takes care of adding the arch lib paths (i686-linux on my machine) and removing dups. Really I asked this question and didn't get much of an answer from folks other than they THOUGHT it was built in the perl binary.
Re: which perl?
use lib qw(/usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1); note that lib.pm takes care of adding the arch lib paths (i686-linux on my machine) and removing dups. Really I asked this question and didn't get much of an answer from folks other than they THOUGHT it was built in the perl binary. You are not the first to have this question. You are not the first to ask many other questions. Most of these recurring questions and the answers to them are documented in the guide. I've sent you the link with the answer in my previous email, but apparently you've ignored it. I don't know why. If you have a question regarding mod_perl, this is the path you should follow: 1. search the guide and other docs at perl.apache.org 2. search your favorite mail archive linked from perl.apache.org 3. ask the list. Hope this helps. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/