Re: the deprecation of Apache->request in mp2

2003-03-28 Thread Andrew Ho
Hello,

NT>I sure hope not! I second John Siracusa's post on this. Keep the HTML
NT>generation well away from request parsing, please!

I personally am 100% in the camp of keeping HTML generation separate from
quest parsing, but I do recognize the advantage of having API level
compatibility between Apache::Request and CGI, so that you could switch
from one to another easily. I think this would be a big win for mod_perl
overall from the "port your scripts quickly" point of view.

I think a good compromise would be to keep the HTML generation code in an
entirely separate module, like Apache::Request::HTML or something. That
class could augment Apache::Request with new methods. (This is somewhat
similar to how Apache::File and Apache::Log augment the Apache class with
new methods.)

This seems to satisfy both sides, and accomplish the laudable goal of
making CGI and Apache::Request API compatible without bloating up the
normal use of Apache::Request.

Humbly,

Andrew

--
Andrew Ho   http://www.tellme.com/   [EMAIL PROTECTED]
Engineer1-800-555-TELL  Voice 650-930-9062
Tellme Networks, Inc. Fax 650-930-9101
--



mod_perl.pm and Apache 2

2003-03-28 Thread Chris Majewski
Hi
I'm trying to build RequestTracker (RT), a trouble ticket system which uses
Apache and  mod_perl. Apache's site  recommends Apache 2, so  I've got
that, and I've built mod_perl-1.99  for it. Now here's the problem. RT
requires  a bunch  of perl  modules, among  them  Apache::Cookie. That
module  requires something  called mod_perl.pm.  So I  do  an "install
mod_perl"  on the  MCPAN  command line.  This  asks me  for my  Apache
source. I answer "/usr/opt/src/httpd-2.0.44". Then I get this:

Configure mod_perl with /usr/opt/src/httpd-2.0.44 ? [y] 
* WARNING *

  Apache Version 1.3.0 required, aborting...


What now?
chris



AuthDBI logoff

2003-03-28 Thread Todd White
i'm seeking a means by which i can allow my web users to "logoff" after
authenticating for access to restricted web space.  i realize that users
can just close their browser, but i'm seeking a solution that allows the
browser to remain open.  essentially, i want a button that a user can
click that causes the web browser to drop the credentials for the realm.

i'm considering writing an Apache handler and returning an
Apache::Constants constant.  but i'm wondering if anyone would have other
suggestions.

btw, Apache 1.3 / mod_perl 1




Re: mod_perl.pm and Apache 2

2003-03-28 Thread Chris Majewski
OK, I've resolved the mod_perl.pm dependency by reinstalling
mod_perl-1.99_08 (from src). But now I get this when trying to install
Apache::Cookie

Can't locate Apache/MyConfig.pm in @INC (@INC contains: 
/usr/perl5/5.6.1/lib/sun4-solaris-64int /usr/perl5/5.6.1/lib 
/usr/perl5/site_perl/5.6.1/sun4-solaris-64int /usr/perl5/site_perl/5.6.1 
/usr/perl5/site_perl /usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int 
/usr/perl5/vendor_perl/5.6.1 /usr/perl5/vendor_perl .) at Makefile.PL line 54.
BEGIN failed--compilation aborted at Makefile.PL line 54.

When I try to install Apache::MyConfig I get this:

Warning: Cannot install Apache::MyConfig, don't know what it is.
Try the command

i /Apache::MyConfig/

to find objects with matching identifiers.

-chris

Chris Majewski <[EMAIL PROTECTED]> writes:

> Hi
> I'm trying to build RequestTracker (RT), a trouble ticket system which uses
> Apache and  mod_perl. Apache's site  recommends Apache 2, so  I've got
> that, and I've built mod_perl-1.99  for it. Now here's the problem. RT
> requires  a bunch  of perl  modules, among  them  Apache::Cookie. That
> module  requires something  called mod_perl.pm.  So I  do  an "install
> mod_perl"  on the  MCPAN  command line.  This  asks me  for my  Apache
> source. I answer "/usr/opt/src/httpd-2.0.44". Then I get this:
> 
> Configure mod_perl with /usr/opt/src/httpd-2.0.44 ? [y] 
> * WARNING *
> 
>   Apache Version 1.3.0 required, aborting...
> 
> 
> What now?
> chris



Re: mod_perl.pm and Apache 2

2003-03-28 Thread Geoffrey Young


Chris Majewski wrote:
OK, I've resolved the mod_perl.pm dependency by reinstalling
mod_perl-1.99_08 (from src). But now I get this when trying to install
Apache::Cookie
Can't locate Apache/MyConfig.pm in @INC (@INC contains: 
/usr/perl5/5.6.1/lib/sun4-solaris-64int /usr/perl5/5.6.1/lib 
/usr/perl5/site_perl/5.6.1/sun4-solaris-64int /usr/perl5/site_perl/5.6.1 
/usr/perl5/site_perl /usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int 
/usr/perl5/vendor_perl/5.6.1 /usr/perl5/vendor_perl .) at Makefile.PL line 54.
BEGIN failed--compilation aborted at Makefile.PL line 54.
Apache::Cookie has not (yet) been ported over to mod_perl 2.0.

what you want is:
  Apache 1.3.27  (http://www.apache.org/dist/httpd/apache_1.3.27.tar.gz)
  mod_perl 1.27 (http://perl.apache.org/dist/mod_perl-1.27.tar.gz)
good luck.

--Geoff





[Question] Handler executing twice!?!

2003-03-28 Thread Vince Veselosky
I'm hoping someone can explain this one to me. I have a virtual host set 
up like so:
<

# This declares Apache::Webquills::InitSession::handler
PerlRequire /var/www/html/webquills/offline/wq_startup.pl

ServerName www.example.com
ServerAlias example.com
ServerPath /test
DocumentRoot /var/www/html/test
PerlHeaderParserHandler Apache::Webquills::InitSession


AllowOverride All
Options Indexes FollowSymLinks MultiViews ExecCGI
Order allow,deny
Allow from all

SetHandler perl-script
PerlHandler Apache::Registry


VHOST
Now here is the thing. The PerlHeaderParserHandler executes TWICE for 
every request. The second time through is apparently a different Apache 
object from the first, as when I write to $r->notes, only the values 
from the second execution are visible to the content handler.

Now, if I comment out the PerlHeaderParserHandler line in the conf file, 
the handler never executes at all (which is expected), so it isn't 
getting pushed onto handlers from somewhere else.

The handler code looks something like this:
<
use vars qw( $stupid );
my $DEBUG =1;
sub handler
{
# Always call 'instance' so as not to clobber params.
my ($r) = Apache::Request->instance(shift);

# Insane bug I cannot track causes this handler to execute twice
# for each request. It's driving me nuts.
if ( $stupid++ ) {
$r->log_error($r->current_callback . " executed twice! Argh!");
$r->notes(HAND2 => "HAND2");
$r->pnotes(HAND2 => "HAND2");
} else {
$r->log_error($r->current_callback . " executed once.");
$r->notes(HAND1 => "HAND1");
$r->pnotes(HAND1 => "HAND1");
return DECLINED;
}#END if

## SNIP -- Some standard Apache::Session stuff happens here.
## This "Log Handler" actually unties and closes the session.
## It executes just fine.
$r->push_handlers('PerlLogHandler', \&closer);
if ( $DEBUG ) {
$r->log_error("$$: ". $r->current_callback);
$r->log_error("$$: ". $r->is_main ? "is main" : "not main");
$r->log_error("$$: ". $r->is_initial_req ? "is initial" : "not 
initial");
}#END if
return OK;
}
CODE

The log messages get me this:
<
[Fri Mar 28 17:27:06 2003] [error] PerlHeaderParserHandler executed once.
[Fri Mar 28 17:27:06 2003] [error] PerlHeaderParserHandler executed 
twice! Argh!
[Fri Mar 28 17:27:06 2003] [error] 19914: PerlHeaderParserHandler
[Fri Mar 28 17:27:06 2003] [error] is main
[Fri Mar 28 17:27:06 2003] [error] is initial

LOG

And the content handler sees values for HAND2 but not for HAND1.

Why is this thing running twice, and how can I make it stop??? I hope 
someone can hit me over the head with a clue-stick, because this thing 
is driving me completely bananas!

All help is greatly appreciated,
Vince Veselosky
http://ice.control-escape.com






gaining access to config directives of other modules

2003-03-28 Thread dorian
i know Apache::Module can get at all the installed modules and their
directives, and even the spec of those directives, but what about the
actual values of those directives? i notice Apache::Module is old, but
i don't see anything else out there that looks like it will come close
to doing the job.

insight is welcome.

.dorian


informing per "Lel Bruce Peto" on current newsflash:

2003-03-28 Thread info
informing per "Lel Bruce Peto" on current newsflash:

The battle is on to put out fires at Iraqi oil wells 
Oil prices have marched higher and key share indexes have fallen, as the 
war in Iraq continues to dominate world markets. 
The North Sea's Brent oil - a benchmark for world oil prices - gained 
$1.53 to $26.82, while US-grade oil rose by nearly two dollars to $30.37.




Problem with Apache::Authen::Program V 0.92 under WinXP

2003-03-28 Thread Ron Savage
(1) I've patch the source slightly:
--- Program.pm  Sat Mar 29 14:32:24 2003
+++ /perl/site/lib/Apache/Authen/Program.pm Sat Mar 29 14:43:10
2003
@@ -11,5 +11,5 @@

 use strict;
-use Apache::Constants ':common';
+use Apache::Constants qw(SERVER_ERROR AUTH_REQUIRED OK);
 use File::Temp q(tempfile);

(2) Some other time I'll use these new constants:
http://perl.apache.org/docs/2.0/user/compat/compat.html#Deprecated_Con
stants

(3) startup.pl:
use Apache2 ();
use ModPerl::Util ();
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::RequestUtil ();
use Apache::Server ();
use Apache::ServerUtil ();
use Apache::Connection ();
use Apache::Log ();
use Apache::Const -compile => ':common';
use APR::Const -compile => ':common';
use APR::Table ();
use Apache::compat ();
use ModPerl::Registry ();
use CGI ();
#use DBI ();
#use DBD::mysql ();

1;

(4) httpd.conf:

AuthName "SWEEP Authentication"
AuthType Basic
PerlSerVar AuthenProgram "/usr/bin/perl /Apache2/authen/authen.pl"
PerlSetVar AuthenProgramSuccess Ok
PerlSetVar AuthenProgramPassword File
PerlAuthenHandler Apache::Authen::Program
require valid-user


(5) What happens is that Apache does not start. It stops within 1
second. There is nothing in error.log.

(6) If I comment out 1 line in httpd.conf:
#   PerlSerVar AuthenProgram "/usr/bin/perl /Apache2/authen/authen.pl"
Apache starts.

(7) I've also tried:
PerlSerVar AuthenProgram "/Apache2/authen/authen.bat"
and
PerlSerVar AuthenProgram /Apache2/authen/authen.bat
in case quotes or a single token (no spaces) made any difference, but
no. authen.bat is just:
perl /Apache2/authen/authen.pl

--
Cheers
Ron Savage, [EMAIL PROTECTED] on 29/03/2003
http://savage.net.au/index.html




Re: AuthDBI logoff

2003-03-28 Thread Thomas Klausner
Hi!

On Fri, Mar 28, 2003 at 02:27:29PM -0500, Todd White wrote:
> i'm seeking a means by which i can allow my web users to "logoff" after
> authenticating for access to restricted web space.  i realize that users
> can just close their browser, but i'm seeking a solution that allows the
> browser to remain open.  essentially, i want a button that a user can
> click that causes the web browser to drop the credentials for the realm.

AFAIK, something like "logoff" is impossible with BASIC Auth (which AuthDBI
uses).

Take a look at Apache::AuthCookie, which implements its own Authentication
scheme and allows "logoff".

Or take a look at Recipie 13.7 in the mod_perl Developers Cookbook.

-- 
#!/usr/bin/perl   http://domm.zsi.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}