Re: [mp2] NetBSD-1.6.2 modperl 1.99_16 httpd 2.0.51-dev make test errors
Stas Bekman [EMAIL PROTECTED] wrote on 11.09.2004 04:46:43: Sorry, it was a different problem. This should fix it. Will commit that shortly. Index: t/apr-ext/threadmutex.t === RCS file: /home/cvs/modperl-2.0/t/apr-ext/threadmutex.t,v retrieving revision 1.1 diff -u -r1.1 threadmutex.t --- t/apr-ext/threadmutex.t 15 Jul 2004 15:30:24 - 1.1 +++ t/apr-ext/threadmutex.t 11 Sep 2004 00:45:41 - @@ -4,6 +4,6 @@ use TestAPRlib::threadmutex; -plan tests = TestAPRlib::threadmutex::num_of_tests(); +plan tests = TestAPRlib::threadmutex::num_of_tests(), need_threads; TestAPRlib::threadmutex::test(); tested this with mod perl 1.99_16. All tests successfull ! I only had to increase APACHE_TEST_STARTUP_TIMEOUT in order to run ModPerl-Registry tests. On my machine we had to wait for 267 seconds for apache to start in ModPerl-Registry tests. Thanks a lot. --Mikhail -- 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
Re: [mp2] NetBSD-1.6.2 modperl 1.99_16 httpd 2.0.51-dev make test errors
[EMAIL PROTECTED] wrote on 13.09.2004 11:14:21: Stas Bekman [EMAIL PROTECTED] wrote on 11.09.2004 04:46:43: Sorry, it was a different problem. This should fix it. Will commit that shortly. Index: t/apr-ext/threadmutex.t === RCS file: /home/cvs/modperl-2.0/t/apr-ext/threadmutex.t,v retrieving revision 1.1 diff -u -r1.1 threadmutex.t --- t/apr-ext/threadmutex.t 15 Jul 2004 15:30:24 - 1.1 +++ t/apr-ext/threadmutex.t 11 Sep 2004 00:45:41 - @@ -4,6 +4,6 @@ use TestAPRlib::threadmutex; -plan tests = TestAPRlib::threadmutex::num_of_tests(); +plan tests = TestAPRlib::threadmutex::num_of_tests(), need_threads; TestAPRlib::threadmutex::test(); tested this with mod perl 1.99_16. All tests successfull ! I only had to increase APACHE_TEST_STARTUP_TIMEOUT in order to run ModPerl-Registry tests. On my machine we had to wait for 267 seconds for apache to start in ModPerl-Registry tests. Thanks a lot. --Mikhail but make install for modperl-1.99_16 fails with the following: /usr/pkg/bin/perl -Iblib/lib/Apache2 -I/usr/home/mgorb/mp-test/mod_perl-1.99_16/Apache-Test/lib -MModPerl::BuildMM -e ModPerl::BuildMM::glue_pod WrapXS/APR/ThreadMutex/ThreadMutex.pm /usr/home/mgorb/mp-test/mod_perl-1.99_16/docs/api/APR/ThreadMutex.pod blib/lib/Apache2/APR/ThreadMutex.pm glue_pod: can't find blib/lib/Apache2/APR/ThreadMutex.pm at blib/lib/Apache2/ModPerl/BuildMM.pm line 275. *** Error code 2 for CVS result is the same: /usr/pkg/bin/perl -Iblib/lib/Apache2 -I/usr/home/mgorb/mp-test/modperl-2.0/Apache-Test/lib -MModPerl::BuildMM -e ModPerl::BuildMM::glue_pod WrapXS/APR/ThreadMutex/ThreadMutex.pm /usr/home/mgorb/mp-test/modperl-2.0/docs/api/APR/ThreadMutex.pod blib/lib/Apache2/APR/ThreadMutex.pm glue_pod: can't find blib/lib/Apache2/APR/ThreadMutex.pm at blib/lib/Apache2/ModPerl/BuildMM.pm line 279. *** Error code 2 -- 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
Re: [mp2] NetBSD-1.6.2 modperl 1.99_16 httpd 2.0.51-dev make test errors
[EMAIL PROTECTED] wrote: but make install for modperl-1.99_16 fails with the following: /usr/pkg/bin/perl -Iblib/lib/Apache2 -I/usr/home/mgorb/mp-test/mod_perl-1.99_16/Apache-Test/lib -MModPerl::BuildMM -e ModPerl::BuildMM::glue_pod WrapXS/APR/ThreadMutex/ThreadMutex.pm /usr/home/mgorb/mp-test/mod_perl-1.99_16/docs/api/APR/ThreadMutex.pod blib/lib/Apache2/APR/ThreadMutex.pm glue_pod: can't find blib/lib/Apache2/APR/ThreadMutex.pm at blib/lib/Apache2/ModPerl/BuildMM.pm line 275. *** Error code 2 I see the same problem on my i386 NetBSD 1.6.2 box. -- 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
ANNOUNCE: Bricolage 1.8.2 Released
The Bricolage development team is pleased to announce the release of Bricolage 1.8.2. This maintenance release addresses quite a large number of issues in Bricolage 1.8.1. The most important changes were to enhance Unicode support in Bricolage. Bricolage now internally handles all text content as UTF-8 strings, thus enabling templates to better control the manipulation of multibyte characters. Other changes include better performance for searches using the ANY() operators and more intelligent transaction handling for distribution jobs. Here are the other highlights of this release: Improvements * Bricolage now runs under a DSO mod_perl as long as it uses a Perl compiled with -Uusemymalloc or -Ubincompat5005. See http://perl.apache.org/docs/1.0/guide/install.html#When_DSO_can_be_Us ed for details. * Alerts triggered to be sent to users who don't have the appropriate contact information will now be logged for those users so that they can see them and acknowledge them under My Alerts. * Added bric_media_dump script to contrib/. * The category association interface used in the story profile when the ENABLE_CATEGORY_BROWSER bricolage.conf directive is enabled now uses radio buttons instead of a link to select the primary category. * Existing jobs are now executed within their own transactions, as opposed to no transaction specification. This means that each job must succeed or fail independent of any other jobs. New jobs are executed before being inserted into the database so as to keep them atomic within their surrounding transaction (generally a UI request). All this means that transactionality is much more intelligent for jobs and will hopefully eliminate job table deadlocks. * All templates now execute with UTF-8 character strings enabled. This means that any templates that convert content to other character sets might need to change the way they do so. For example, templates that had used %filter blocks to convert content to another encoding using something like Encode::from_to($_, 'utf-8', $encoding) must now use something like $_ = Encode::encode($encoding, $_), instead. Bric::Util::CharTrans should continue to do the right thing. * Added encoding attribute to Bric::Util::Burner so that, if templates are outputting something other than Perl utf8 decoded data, they can specify what they're outputting, and the file opened for output from the templates will be set to the proper mode. Applies to Perl 5.8.0 and later only. * Added SFTP_HOME bricolage.conf directive to specify the home directory and location of SSH keys when SSH is enabled. Bug Fixes * make clone once again properly copies the lib/Makefile.PL and bin/Makefile.PL files from the source directory. * Added missing language-specifying HTML attributes so as to properly localize story titles and the like. * The list of output channels to add to an element in the element profile now contains the name of the site that each is associated with, since different sites can have output channels with the same names. * The Advanced Search interface once again works for searching for related story and media documents. * Bricolage no longer attempts to email alerts to an empty list of recipients. This will make your SMTP server happier. * The version numbering issues of Bricolage modules have all been worked out after the confusion in 1.8.1. This incidentally allows the HTML::Template and Template Toolkit burners to be available again. * Misspelling the name of a key name tag or including a non-repeatable field more than once in Super Bulk Edit no longer causes all of the changes in that screen to be lost. * When a user overrides the global Date/Time Format and Time Zone preferences, the affects of the overrides are now properly reflected in the UI. * Publishing a story or media document along with its related story or media documents from a publish desk again correctly publishes the original asset as well as the relateds. * Deleted output channels no longer show up in the select list for story type and media type elements. * Deleting a workflow from the workflow manager now properly updates the workflow cache so that the deleted workflow is removed from the left navigation without a restart. * When Bricolage notices that a document or template is not in workflow or on a desk when it should be, it is now more intelligent in trying to select the correct workflow and/or desk to put it on, based on current workflow context and user permissions. * Content submitted to Bricolage in the UTF-8
Re: [mp2] NetBSD-1.6.2 modperl 1.99_16 httpd 2.0.51-dev make test errors
Carl Brewer wrote: [EMAIL PROTECTED] wrote: but make install for modperl-1.99_16 fails with the following: /usr/pkg/bin/perl -Iblib/lib/Apache2 -I/usr/home/mgorb/mp-test/mod_perl-1.99_16/Apache-Test/lib -MModPerl::BuildMM -e ModPerl::BuildMM::glue_pod WrapXS/APR/ThreadMutex/ThreadMutex.pm /usr/home/mgorb/mp-test/mod_perl-1.99_16/docs/api/APR/ThreadMutex.pod blib/lib/Apache2/APR/ThreadMutex.pm glue_pod: can't find blib/lib/Apache2/APR/ThreadMutex.pm at blib/lib/Apache2/ModPerl/BuildMM.pm line 275. *** Error code 2 I see the same problem on my i386 NetBSD 1.6.2 box. Yes, but I've asked you to use cvs, where this has been fixed. Please confirm that it is the case. -- __ Stas BekmanJAm_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
Re: [mp2] NetBSD-1.6.2 modperl 1.99_16 httpd 2.0.51-dev make test errors
[EMAIL PROTECTED] wrote: Stas Bekman [EMAIL PROTECTED] wrote on 11.09.2004 04:46:43: Sorry, it was a different problem. This should fix it. Will commit that shortly. Index: t/apr-ext/threadmutex.t === RCS file: /home/cvs/modperl-2.0/t/apr-ext/threadmutex.t,v retrieving revision 1.1 diff -u -r1.1 threadmutex.t --- t/apr-ext/threadmutex.t 15 Jul 2004 15:30:24 - 1.1 +++ t/apr-ext/threadmutex.t 11 Sep 2004 00:45:41 - @@ -4,6 +4,6 @@ use TestAPRlib::threadmutex; -plan tests = TestAPRlib::threadmutex::num_of_tests(); +plan tests = TestAPRlib::threadmutex::num_of_tests(), need_threads; TestAPRlib::threadmutex::test(); tested this with mod perl 1.99_16. All tests successfull ! Excellent. I only had to increase APACHE_TEST_STARTUP_TIMEOUT in order to run ModPerl-Registry tests. On my machine we had to wait for 267 seconds for apache to start in ModPerl-Registry tests. Really? How long does it take to start the main test suite? Any idea why does it take so long? Or is that that slow machine that you gave me the access to a few months ago? -- __ Stas BekmanJAm_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
Re: [mp2] NetBSD-1.6.2 modperl 1.99_16 httpd 2.0.51-dev make test errors
Joe Orton wrote: On Thu, Sep 09, 2004 at 11:38:15AM +0400, [EMAIL PROTECTED] wrote: I wasn't surprised this fails on OpenBSD but I am surprised it fails on NetBSD. Can you compile and run: http://www.apache.org/~jorton/nonblock.c and post the output. (it would be useful if you could do this on OpenBSD too, Ken, for verification) sorry for the dealy -- was away from my PC for a day k714% ./nonblock found port: 52984 O_NONBLOCK is not set in the child. This is rather confusing, since it means that apparently the test is working OK, and O_NONBLOCK is *not* inherited across accept() on NetBSD, which contradicts the behaviour you are seeing. Guys, could you please resolve this issue. It felt between the chairs and the new mod_perl release's test suite will still have this problem. The bug is in libapr and the sooner you resolve it the better. Could someone on the *BSD platform lead this effort and coordinate the resolution? Thanks. -- __ Stas BekmanJAm_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
Re: Hosting provider disallows mod_perl - memory hog / unstable
Hi Will, Thanks for taking the time to respond. What bothered me about your policy is that it accuses mod_perl of these things, and yet you offer PHP as an apache module. PHP has plenty of security issues when you don't run it as CGI, and you can certainly crash the server with it. I'll see if we can update the kbase entry to be a little more specific and not to sound so much like we're blaming mod_perl itself (not our intent). Thank you, that would be much appreciated. I think that offering it on dedicated hosts (or virtual machines) is the best approach, and I'm glad see that you fully support that. - Perrin -- 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
Re: Hosting provider disallows mod_perl - memory hog / unstable
On 11 Sep 2004, at 20:35, Will Yardley wrote: But businesses don't just let various random people off the street write code and then load it on their servers. Explain the success of PHP then. Apparently the cross-site holes were tolerable for long enough... Will Yardley (of DreamHost) You guy suck a lot less than most ;-) -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands -- 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
Error building mod_perl 1.29 on Mac OS X 10.3.5.
Hi, I get the following error building mod_perl 1.29 on Mac OS X 10.3.5. I looked in the archives and see the problem reported multiple times but apparently without a resolution ? Joris. cc -c -I. -I/usr/local/lib/perl5/5.8.5/darwin-thread-multi-2level/CORE -I./os/unix -I./include -DDARWIN -DMOD_PERL -DUSE_PERL_SSI -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -DUSE_HSREGEX -DNO_DL_NEEDED -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe `./apaci` modules.c cc -c -I. -I/usr/local/lib/perl5/5.8.5/darwin-thread-multi-2level/CORE -I./os/unix -I./include -DDARWIN -DMOD_PERL -DUSE_PERL_SSI -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -DUSE_HSREGEX -DNO_DL_NEEDED -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe `./apaci` buildmark.c cc -DDARWIN -DMOD_PERL -DUSE_PERL_SSI -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -DUSE_HSREGEX -DNO_DL_NEEDED -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe `./apaci`\ -o httpd buildmark.o modules.o modules/perl/libperl.a modules/standard/libstandard.a main/libmain.a ./os/unix/libos.a ap/libap.a regex/libregex.a -L/usr/local/lib /usr/local/lib/perl5/5.8.5/darwin-thread-multi-2level/auto/DynaLoader/DynaLoader.a -L/usr/local/lib/perl5/5.8.5/darwin-thread-multi-2level/CORE -lperl -ldl -lm -lc ld: warning multiple definitions of symbol _regcomp regex/libregex.a(regcomp.o) definition of _regcomp in section (__TEXT,__text) /usr/lib/libdl.dylib(regcomp.So) definition of _regcomp ld: warning multiple definitions of symbol _regexec regex/libregex.a(regexec.o) definition of _regexec in section (__TEXT,__text) /usr/lib/libdl.dylib(regexec.So) definition of _regexec ld: warning multiple definitions of symbol _regfree regex/libregex.a(regfree.o) definition of _regfree in section (__TEXT,__text) /usr/lib/libdl.dylib(regfree.So) definition of _regfree ld: Undefined symbols: _actions_module _include_module _log_config_module make[3]: *** [target_static] Error 1 make[2]: *** [build-std] Error 2 make[1]: *** [build] Error 2 make: *** [apaci_httpd] Error 2 -- 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
Re: Error building mod_perl 1.29 on Mac OS X 10.3.5.
Joris Verboomen wrote: Hi, I get the following error building mod_perl 1.29 on Mac OS X 10.3.5. I looked in the archives and see the problem reported multiple times but apparently without a resolution ? Joris. cc -c -I. -I/usr/local/lib/perl5/5.8.5/darwin-thread-multi-2level/CORE -I./os/unix -I./include -DDARWIN -DMOD_PERL -DUSE_PERL_SSI -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -DUSE_HSREGEX -DNO_DL_NEEDED -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe `./apaci` modules.c cc -c -I. -I/usr/local/lib/perl5/5.8.5/darwin-thread-multi-2level/CORE -I./os/unix -I./include -DDARWIN -DMOD_PERL -DUSE_PERL_SSI -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -DUSE_HSREGEX -DNO_DL_NEEDED -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe `./apaci` buildmark.c cc -DDARWIN -DMOD_PERL -DUSE_PERL_SSI -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -DUSE_HSREGEX -DNO_DL_NEEDED -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe `./apaci`\ -o httpd buildmark.o modules.o modules/perl/libperl.a modules/standard/libstandard.a main/libmain.a ./os/unix/libos.a ap/libap.a regex/libregex.a -L/usr/local/lib /usr/local/lib/perl5/5.8.5/darwin-thread-multi-2level/auto/DynaLoader/DynaLoader.a -L/usr/local/lib/perl5/5.8.5/darwin-thread-multi-2level/CORE -lperl -ldl -lm -lc ld: warning multiple definitions of symbol _regcomp regex/libregex.a(regcomp.o) definition of _regcomp in section (__TEXT,__text) /usr/lib/libdl.dylib(regcomp.So) definition of _regcomp ld: warning multiple definitions of symbol _regexec regex/libregex.a(regexec.o) definition of _regexec in section (__TEXT,__text) /usr/lib/libdl.dylib(regexec.So) definition of _regexec ld: warning multiple definitions of symbol _regfree regex/libregex.a(regfree.o) definition of _regfree in section (__TEXT,__text) /usr/lib/libdl.dylib(regfree.So) definition of _regfree ld: Undefined symbols: _actions_module _include_module _log_config_module It's not the first time this problem is reported. Take a look at: http://www.google.ca/search?hl=frie=UTF-8q=Undefined+symbols%3A%0D%0A_actions_module%0D%0A_include_module%0D%0A_log_config_module+btnG=Recherche+Googlemeta= Apparently it works fine as DSO. I'm not on Mac OS X so I can't help much here :( -- __ Stas BekmanJAm_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
Apache::AuthenCache for mod_perl 1.99
I've made a quick port of this to mod_perl 1.99 - surprised to not see it already. Attached a diff and the full module. -D -- A good messenger expects to get shot. --Larry Wall # $Id: AuthenCache.pm,v 1.6 2001/01/03 19:17:56 cgilmore Exp $ # # Author : Jason Bodnar, Christian Gilmore # Created On : Long ago # Status : Functional # # PURPOSE #User Authentication Cache # ### # Package name package Apache::AuthenCache; # Required libraries use strict; use mod_perl; use constant MP2 = $mod_perl::VERSION 1.99 ? 0 : 1; BEGIN { if (MP2) { require Apache2; require Apache::Access; require Apache::RequestRec; require Apache::RequestUtil; require Apache::RequestIO; require Apache::ServerUtil; require Apache::Const; Apache::Const-import(-compile = qw(OK AUTH_REQUIRED DECLINED DONE)); require APR::Table; } else { require Apache; require Apache::Constants; Apache::Constants-import(qw(OK AUTH_REQUIRED DECLINED DONE)); } } use Apache::Log (); use IPC::Cache; # Global variables $Apache::AuthenCache::VERSION = '0.1'; ### ### # handler: hook into Apache/mod_perl API ### ### sub handler { my $r = shift; # only the first internal request unless ($r-is_initial_req()) { return MP2 ? Apache::OK() : Apache::Constants::OK(); } # Get configuration my $nopasswd = $r-dir_config('AuthenCache_NoPasswd') || 'off'; my $encrypted= $r-dir_config('AuthenCache_Encrypted') || 'on'; my $casesensitive= $r-dir_config('AuthenCache_CaseSensitive') || 'on'; my $cache_time_limit = $r-dir_config('AuthenCache_CacheTime') || 900; my $auth_name= $r-auth_name(); # Clear for paranoid security precautions my %notes = ('AuthenCache' = 'miss'); if (MP2) { my $table = APR::Table::make($r-pool(), 1); $table-set(%notes); $r-notes($table); } else { $r-notes(%notes); } # Get response and password my ($res, $passwd_sent) = $r-get_basic_auth_pw(); return $res if $res; # e.g. HTTP_UNAUTHORIZED # If the user left the username field blank, we must catch it and DECLINE # for the downstream handler my $user_sent = MP2 ? $r-user() : $r-connection()-user(); unless ($user_sent) { return MP2 ? Apache::DECLINED() : Apache::Constants::DECLINED(); } $r-log-debug(handler: username=$user_sent); # Do we want Windows-like case-insensitivity? if ($casesensitive eq 'off') { $user_sent = lc($user_sent); } # Create or retreive the cache (if already created) # Use the Realm name ($auth_name) for different caches for each realm my $cache = IPC::Cache-new({ namespace = $auth_name }); my $passwd = $cache-get($user_sent); # User not in cache unless ($passwd) { $r-log-debug(handler: user/group not in cache; returning DECLINED); return MP2 ? Apache::DECLINED() : Apache::Constants::DECLINED(); } # Is the user in the cache $r-log-debug(handler: using cached passwd for $user_sent); # Allow no password if ($nopasswd eq 'on' and not length($passwd)) { $r-log-debug(handler: no password required; returning DONE); # Must return DECLINED so that user has a chance to put in no password return MP2 ? Apache::DONE() : Apache::Constants::DONE(); } # If nopasswd is off, reject user unless (length($passwd_sent) and length($passwd)) { $r-log-debug(handler: user $user_sent: empty password(s) rejected . $r-uri); # Must return DECLINED so that user has a chance to put in a new password return MP2 ? Apache::DECLINED() : Apache::Constants::DECLINED(); } # Is crypt is needed if ($encrypted eq 'on') { my $salt = substr($passwd, 0, 2); $passwd_sent = crypt($passwd_sent, $salt); } unless ($passwd_sent eq $passwd) { $r-log-debug(AuthenCache::handler: user $user_sent: password mismatch . $r-uri); # Must return DECLINED so that user has a chance to put in a new
Re: Apache::AuthenCache for mod_perl 1.99
Dan Sully wrote: I've made a quick port of this to mod_perl 1.99 - surprised to not see it already. Attached a diff and the full module. -D # $Id: AuthenCache.pm,v 1.6 2001/01/03 19:17:56 cgilmore Exp $ # # Author : Jason Bodnar, Christian Gilmore Dan, you probably want to CC the authors, in case they are not listening here... so it'll end up on CPAN... Thanks. -- __ Stas BekmanJAm_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
Re: Apache::AuthenCache for mod_perl 1.99
* Stas Bekman [EMAIL PROTECTED] shaped the electrons to say... Dan, you probably want to CC the authors, in case they are not listening here... so it'll end up on CPAN... Thanks. Already done - we'll see if they're listening elsewhere. -D -- A good messenger expects to get shot. --Larry Wall -- 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
Re: Apache::AuthenCache for mod_perl 1.99
In message [EMAIL PROTECTED], Dan Sully writes: I've made a quick port of this to mod_perl 1.99 - surprised to not see it alre ady. One of the reasons I haven't released the Apache::AuthenURL for mod_perl2 is because I haven't figured out how best to distribute my AuthenCache which is a rewrite of Jason and Chris's code for mp2 stacked handlers. Adding mp2 support to the mp1 code was giving me headaches so I started from scratch. Perhaps I should clean it up and ship it as Apache::AuthenURL::AuthenCache ? John [EMAIL PROTECTED] package Apache::AuthenCache; use strict; use mod_perl; use Apache::Log; use Apache::Status; use Apache::Access; use Apache::Const -compile = qw(HTTP_UNAUTHORIZED OK DECLINED DONE); use Apache::Module; use Apache::RequestRec; use Apache::RequestUtil; use APR::Table; use Cache::SharedMemoryCache; use Date::Format; use vars qw($VERSION); my $prefix = Apache::AuthenCache; $VERSION = '2.00'; my(%ConfigDefaults) = ( AuthenCache_Encrypted = 'on', AuthenCache_CacheTime = 'never', ); sub handler { my($r) = @_; return Apache::OK unless $r-is_initial_req; my($status, $password) = $r-get_basic_auth_pw; return $status unless $status == Apache::OK; my $auth_name = $r-auth_name; my $attribute = {}; while(my($key, $value) = each %ConfigDefaults) { $value = $r-dir_config($key) || $value; $key =~ s/^AuthenCache_//; $attribute-{$key} = lc $value; } my $cache = new Cache::SharedMemoryCache( { namespace = $auth_name }, default_expires_in = $attribute-{CacheTime}, ); my $user = $r-user; if (my $cached_password = $cache-get($user)) { $r-log-debug($prefix, ::handler: using cached password for $user); if ($attribute-{Encrypted} eq 'on') { $r-log-debug($prefix, ::handler: encrypting password); my $salt = substr($cached_password, 0, 2); $password = crypt($password, $salt); } if ($password eq $cached_password) { return Apache::OK; } else { $r-note_basic_auth_failure; return Apache::HTTP_UNAUTHORIZED; } } $r-push_handlers(PerlFixupHandler = \manage_cache); return Apache::DECLINED; } sub manage_cache { my($r) = @_; my($status, $password) = $r-get_basic_auth_pw; my $attribute = {}; while(my($key, $value) = each %ConfigDefaults) { $value = $r-dir_config($key) || $value; $key =~ s/^AuthenCache_//; $attribute-{$key} = $value; } my $user = $r-user; my $auth_name = $r-auth_name; if ($attribute-{Encrypted} eq 'on') { $r-log-debug($prefix, ::manage_cache: encrypted password); my @alphabet = ('a' .. 'z', 'A' .. 'Z', '0' .. '9', '.', '/'); my $salt = join ('', @alphabet[rand (64), rand (64)]); $password = crypt($password, $salt); } my $cache = new Cache::SharedMemoryCache( { namespace = $auth_name }, default_expires_in = $attribute-{CacheTime}, ); $cache-purge; $cache-set($user, $password, $attribute-{CacheTime}); $r-log-debug($prefix, ::manage_cache: storing user:, $user); return Apache::OK; } Apache::Status-menu_item( $prefix = Authentication Cache, sub { my $caches = new Cache::SharedMemoryCache; my(@s) = TABLE BORDER=1; foreach my $namespace ($caches-get_namespaces) { my $cache = new Cache::SharedMemoryCache({namespace = $namespace}); push @s, TRTH$namespace/TH/TR; push @s, TRTDTABLE BORDER=1; push @s, TRTHUsername/THTHCreated At/THTHExpires At/TH/TR; foreach my $username ($cache-get_keys) { my $user = $cache-get_object($username); my $created_at = ctime $user-get_created_at; my $expires_at = ($user-get_expires_at eq never) ? NEVER : ctime $user-get_expires_at; push @s, TRTD$username/TDTD, $created_at, /TDTD, $expires_at, /TD/TR; } push @s, /TD/TR/TABLE; } push @s, /TABLE; return [EMAIL PROTECTED]; }, ) if Apache::Module::loaded('Apache::Status'); 1; __END__ =head1 NAME Apache::AuthenCache - Authentication caching used in conjuction with a primary authentication module (eg Apache::AuthenURL) and mod_perl2 =head1 SYNOPSIS # In your httpd.conf PerlModule Apache::AuthenCache # In httpd.conf or .htaccess: AuthName Name AuthType Basic PerlAuthenHandler Apache::AuthenCache Primary Authentication Module require valid-user # Optional parameters PerlSetVar AuthenCache_CacheTime 900 # Default: indefinite PerlSetVar AuthenCache_Encrypted Off # Default: On =head1 DESCRIPTION BApache::AuthenCache implements a caching mechanism in order to speed up authentication and to reduce the usage of system resources. It must be used in conjunction
Re: [mp2] NetBSD-1.6.2 modperl 1.99_16 httpd 2.0.51-dev make test errors
Carl Brewer wrote: Stas Bekman wrote: Carl Brewer wrote: [EMAIL PROTECTED] wrote: but make install for modperl-1.99_16 fails with the following: /usr/pkg/bin/perl -Iblib/lib/Apache2 -I/usr/home/mgorb/mp-test/mod_perl-1.99_16/Apache-Test/lib -MModPerl::BuildMM -e ModPerl::BuildMM::glue_pod WrapXS/APR/ThreadMutex/ThreadMutex.pm /usr/home/mgorb/mp-test/mod_perl-1.99_16/docs/api/APR/ThreadMutex.pod blib/lib/Apache2/APR/ThreadMutex.pm glue_pod: can't find blib/lib/Apache2/APR/ThreadMutex.pm at blib/lib/Apache2/ModPerl/BuildMM.pm line 275. *** Error code 2 I see the same problem on my i386 NetBSD 1.6.2 box. Yes, but I've asked you to use cvs, where this has been fixed. Please confirm that it is the case. Current CVS checked out 10 mins ago : /usr/bin/perl -Iblib/lib -I/data/src/modperl-2.0/Apache-Test/lib -MModPerl::BuildMM -e ModPerl::BuildMM::glue_pod WrapXS/APR/ThreadMutex/ThreadMutex.pm /data/src/modperl-2.0/docs/api/APR/ThreadMutex.pod blib/lib/APR/ThreadMutex.pm glue_pod: can't find blib/lib/APR/ThreadMutex.pm at blib/lib/ModPerl/BuildMM.pm line 279. gmake: *** [glue_pods] Error 2 Sure enough, there's no ThreadMutex.pm in blib/lib/APR/ Mea culpa, not sure why it did work for me. I guess my emulation of apr not having threads didn't work completely. Please try this patch: Index: lib/ModPerl/BuildMM.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildMM.pm,v retrieving revision 1.21 diff -u -r1.21 BuildMM.pm --- lib/ModPerl/BuildMM.pm 8 Sep 2004 04:10:09 - 1.21 +++ lib/ModPerl/BuildMM.pm 14 Sep 2004 00:36:00 - @@ -274,9 +274,7 @@ # it's possible that the .pm file is not existing # (e.g. ThreadMutex.pm is not created on unless # $apr_config-{HAS_THREADS}) -return unless -e $pm; - -die glue_pod: can't find $dst unless -e $dst; +return unless -e $pm -e $dst; # have we already glued the doc? exit 0 unless -s $pm == -s $dst; -- __ Stas BekmanJAm_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
cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm
gozer 2004/09/13 15:36:19 Modified:.Changes t/response/TestAPI module.pm t/response/TestDirective cmdparms.pm perlloadmodule.pm perlloadmodule2.pm perlloadmodule3.pm perlloadmodule4.pm perlloadmodule5.pm perlloadmodule6.pm xs/Apache/Module Apache__Module.h xs/maps apache_functions.map xs/tables/current/ModPerl FunctionTable.pm Log: Apache::Module top_module() and get_config() changed from class methods to regular subroutines Revision ChangesPath 1.482 +3 -0 modperl-2.0/Changes Index: Changes === RCS file: /home/cvs/modperl-2.0/Changes,v retrieving revision 1.481 retrieving revision 1.482 diff -u -r1.481 -r1.482 --- Changes 9 Sep 2004 22:39:10 - 1.481 +++ Changes 13 Sep 2004 22:36:18 - 1.482 @@ -12,6 +12,9 @@ =item 1.99_17-dev +Apache::Module top_module() and get_config() changed from class +methods to regular subroutines [Gozer] + Added Apache::CmdParms::add_config() to work around a memory leak discovered with Perl sections in .htaccess files [Gozer] 1.22 +1 -1 modperl-2.0/t/response/TestAPI/module.pm Index: module.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/module.pm,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- module.pm 25 Aug 2004 21:47:19 - 1.21 +++ module.pm 13 Sep 2004 22:36:18 - 1.22 @@ -18,7 +18,7 @@ my $cfg = Apache::Test::config(); -my $top_module = Apache::Module-top_module; +my $top_module = Apache::Module::top_module(); my $module_count = 0; for (my $modp = $top_module; $modp; $modp = $modp-next) { 1.8 +1 -1 modperl-2.0/t/response/TestDirective/cmdparms.pm Index: cmdparms.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/cmdparms.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- cmdparms.pm 17 Aug 2004 23:40:41 - 1.7 +++ cmdparms.pm 13 Sep 2004 22:36:19 - 1.8 @@ -52,7 +52,7 @@ sub get_config { my($self, $s) = (shift, shift); -Apache::Module-get_config($self, $s, @_); +Apache::Module::get_config($self, $s, @_); } ### response handler ### 1.6 +1 -1 modperl-2.0/t/response/TestDirective/perlloadmodule.pm Index: perlloadmodule.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/perlloadmodule.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- perlloadmodule.pm 9 Jul 2004 15:27:32 - 1.5 +++ perlloadmodule.pm 13 Sep 2004 22:36:19 - 1.6 @@ -90,7 +90,7 @@ sub get_config { my($self, $s) = (shift, shift); -Apache::Module-get_config($self, $s, @_); +Apache::Module::get_config($self, $s, @_); } sub handler : method { 1.7 +1 -1 modperl-2.0/t/response/TestDirective/perlloadmodule2.pm Index: perlloadmodule2.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/perlloadmodule2.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- perlloadmodule2.pm18 Apr 2003 06:18:58 - 1.6 +++ perlloadmodule2.pm13 Sep 2004 22:36:19 - 1.7 @@ -70,7 +70,7 @@ sub get_config { my($self, $s) = (shift, shift); -Apache::Module-get_config($self, $s, @_); +Apache::Module::get_config($self, $s, @_); } sub handler : method { 1.5 +3 -3 modperl-2.0/t/response/TestDirective/perlloadmodule3.pm Index: perlloadmodule3.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/perlloadmodule3.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- perlloadmodule3.pm9 Jul 2004 08:01:21 - 1.4 +++ perlloadmodule3.pm13 Sep 2004 22:36:19 - 1.5 @@ -35,7 +35,7 @@ my($key, $self, $parms, $arg) = @_; $self-{$key} = $arg; unless ($parms-path) { -my $srv_cfg = Apache::Module-get_config($self, $parms-server); +my $srv_cfg = Apache::Module::get_config($self, $parms-server); $srv_cfg-{$key} = $arg; } } @@ -44,7 +44,7 @@ my($key, $self, $parms, $arg) = @_; push @{ $self-{$key} }, $arg; unless ($parms-path) { -my $srv_cfg =
cvs commit: modperl-2.0/todo api_status
gozer 2004/09/13 15:52:40 Modified:todo api_status Log: Add a few methods that are still up for debate/discussion Revision ChangesPath 1.35 +3 -0 modperl-2.0/todo/api_status Index: api_status === RCS file: /home/cvs/modperl-2.0/todo/api_status,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- api_status19 Aug 2004 06:03:54 - 1.34 +++ api_status13 Sep 2004 22:52:40 - 1.35 @@ -19,6 +19,8 @@ -- src/docs/2.0/api/Apache.pod VV src/docs/2.0/api/Apache/Access.pod g- src/docs/2.0/api/Apache/CmdParms.pod +info +context g- src/docs/2.0/api/Apache/Command.pod VP src/docs/2.0/api/Apache/Connection.pod conn_config @@ -32,6 +34,7 @@ +- src/docs/2.0/api/Apache/Log.pod log_pid g- src/docs/2.0/api/Apache/Module.pod +version VV src/docs/2.0/api/Apache/PerlSections.pod VV src/docs/2.0/api/Apache/Process.pod VV src/docs/2.0/api/Apache/Reload.pod
cvs commit: modperl-2.0/t/response/TestDirective cmdparms.pm
gozer 2004/09/13 16:02:35 Modified:t/response/TestDirective cmdparms.pm Log: Cleanup test a bit by using inheritance. Revision ChangesPath 1.9 +1 -6 modperl-2.0/t/response/TestDirective/cmdparms.pm Index: cmdparms.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/cmdparms.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- cmdparms.pm 13 Sep 2004 22:36:19 - 1.8 +++ cmdparms.pm 13 Sep 2004 23:02:35 - 1.9 @@ -4,7 +4,7 @@ use warnings FATAL = 'all'; use Apache::CmdParms (); -use Apache::Module (); +use base qw(Apache::Module); use Apache::Test; use Apache::TestUtil; @@ -48,11 +48,6 @@ $parms-check_cmd_context(Apache::NOT_IN_LOCATION); $srv_cfg-{$args}{limited} = $parms-method_is_limited('GET'); -} - -sub get_config { -my($self, $s) = (shift, shift); -Apache::Module::get_config($self, $s, @_); } ### response handler ###
cvs commit: modperl-2.0/t/response/TestCompat apache_module.pm
gozer 2004/09/13 17:04:51 Modified:lib/Apache compat.pm t/response/TestCompat apache_module.pm Log: Apache::Module get_config top_module didn't need to be overriden methods, keep it simple with smart wrappers instead Revision ChangesPath 1.120 +17 -0 modperl-2.0/lib/Apache/compat.pm Index: compat.pm === RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v retrieving revision 1.119 retrieving revision 1.120 diff -u -r1.119 -r1.120 --- compat.pm 13 Sep 2004 23:36:08 - 1.119 +++ compat.pm 14 Sep 2004 00:04:51 - 1.120 @@ -264,6 +264,23 @@ $r; } +{ +require Apache::Module; +my $orig_sub = *Apache::Module::top_module{CODE}; +*Apache::Module::top_module = sub { +$orig_sub-(); +}; +} + +{ +require Apache::Module; +my $orig_sub = *Apache::Module::get_config{CODE}; +*Apache::Module::get_config = sub { +shift if $_[0] eq 'Apache::Module'; +$orig_sub-(@_); +}; +} + package Apache::Server; # XXX: is that good enough? see modperl/src/modules/perl/mod_perl.c:367 our $CWD = Apache::ServerUtil::server_root; 1.2 +0 -6 modperl-2.0/t/response/TestCompat/apache_module.pm Index: apache_module.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestCompat/apache_module.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- apache_module.pm 13 Sep 2004 23:36:08 - 1.1 +++ apache_module.pm 14 Sep 2004 00:04:51 - 1.2 @@ -19,9 +19,7 @@ sub TestCompatApacheModuleParms { my($self, $parms, $args) = @_; -Apache::compat::override_mp2_api('Apache::Module::get_config'); my $config = Apache::Module-get_config($self, $parms-server); -Apache::compat::restore_mp2_api('Apache::Module::get_config'); $config-{data} = $args; } @@ -30,14 +28,10 @@ plan $r, tests = 2; -Apache::compat::override_mp2_api('Apache::Module::top_module'); my $top_module = Apache::Module-top_module(); -Apache::compat::restore_mp2_api('Apache::Module::top_module'); ok t_cmp (ref($top_module), 'Apache::Module'); -Apache::compat::override_mp2_api('Apache::Module::get_config'); my $config = Apache::Module-get_config($self, $r-server); -Apache::compat::restore_mp2_api('Apache::Module::get_config'); ok t_cmp ($config-{data}, 'Test'); OK;
cvs commit: modperl-2.0/lib/Apache compat.pm
gozer 2004/09/13 17:08:27 Modified:lib/Apache compat.pm Log: delayed loading of Apache::Module for compat is not necessary Revision ChangesPath 1.121 +1 -2 modperl-2.0/lib/Apache/compat.pm Index: compat.pm === RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v retrieving revision 1.120 retrieving revision 1.121 diff -u -r1.120 -r1.121 --- compat.pm 14 Sep 2004 00:04:51 - 1.120 +++ compat.pm 14 Sep 2004 00:08:27 - 1.121 @@ -38,6 +38,7 @@ use Apache::ServerRec (); use Apache::ServerUtil (); use Apache::Access (); +use Apache::Module (); use Apache::RequestRec (); use Apache::RequestIO (); use Apache::RequestUtil (); @@ -265,7 +266,6 @@ } { -require Apache::Module; my $orig_sub = *Apache::Module::top_module{CODE}; *Apache::Module::top_module = sub { $orig_sub-(); @@ -273,7 +273,6 @@ } { -require Apache::Module; my $orig_sub = *Apache::Module::get_config{CODE}; *Apache::Module::get_config = sub { shift if $_[0] eq 'Apache::Module';