Apache::Request

2000-06-25 Thread Ian Mahuron


Is anyone using this module (Apache::Request) in production?  I'm interested
in using it for general client input as well as client uploads.  I'm
terribly concerned about security when it comes to client uploads.  As the
documentation is fairly sparse, does anyone have some snippets of code that
would give me a good idea of how to use this module securely?  I'm also
wondering what the pros/cons are of using this module vs. CGI.pm.

TIA!

Ian




Re: Footer.pm - Thanks

2000-06-25 Thread My Alias

G.W.,

Thanks for the help with my question.  I meant to send
a note yesterday, but to be honest, couldn't remember
if I actually sent it.  So wanted to be safe rather
than ungrateful.

Regarding the points you made, I will need to look
into them a bit more  before I really know if I'm
running things the right way.  I kind of followed a
cook-book and got this thing working, and to be
honest, I really am not sure what I've got (mod_perl
or Apache::Registry).  :)

Specifically, the only module i've tried so far is the
Footer.pm, and it in fact was installed into:
/usr/local/apache/lib/perl/Apache.

As for the "bit" about cgi-bin, I did not know that it
would make a difference, so I just used it as an
example.  Actually, I have in the httpd.conf file the
following:

Alias /db-bin/ "/home/httpd/db-bin/"
Location "/db-bin"
  SetHandler  perl-script   
  PerlHandler Apache::Registry
  PerlSendHeader  On
  Options +ExecCGI 
/Location

#   Location "/db-bin"
# SetHandler  perl-script   
# PerlHandler Apache::Footer
#   /Location

## Commented out as the CGI.pm won't parse otherwise.

If you still happen to be reading this, I'd sure
appreciate a quick note if anything obvious jumps out
at you regarding directories (above).  I'm in the
process of trying to understand why my "stuff" fails
under "use strict;" (vars, redefined subroutines,
etc.) and then I'll try and go for the Footer.  But if
it's a simple one, would love to knock it out and have
some uniform footers. :)

Thanks again for your help.

-Brett


As for the 
--- "G.W. Haywood" [EMAIL PROTECTED] wrote:
 Hi there,
 
 On Sat, 24 Jun 2000, My Alias wrote:
 
Location /cgi-bin
  SetHandler perl-script
  PerlHandler Apache::Footer
/Location
  
  and restarted the server.
  
  Now, what used to be sent out as html is sent out
  looking like:
  
  #!/usr/bin/perl -w
  use strict;
  blah,
  blah,
  
  
  
  I'm using CGI.pm and Apache::Registry.
  What did I miss?  
 
 I can't see anything about Apache::Registry in your
 message except the
 bit where you claim to be using it.  Without seeing
 your entire Apache
 configuration I'm not _sure_ you're doing this, but
 I think you are
 trying to have your Location cgi-bin handled BOTH
 by mod_perl AND by
 mod_cgi.  I don't think you really want that.  You
 want some other
 Location such as cgi-perl for your mod_perl stuff,
 so you keep
 cgi-bin for old CGI scripts and stuff like that.  To
 keep it clean, I
 wouldn't even use Registry on things in there.
 
 So for example for mod_perl stuff you might say:
 
 Alias /perl/ /usr/local/apache/cgi-perl/
 Location /perl
   SetHandler perl-script
   PerlHandler Apache::Footer
 /Location
 
 and for Apache::Registry stuff:
 
 Alias /registry/ /usr/local/apache/cgi-registry/
 Location /perl
   SetHandler perl-script
   PerlHandler Apache::Registry
 /Location
 
 The `Location' /perl/ doesn't really exist, it's
 just a URI that
 triggers Apache to look for things in the directory
 (in this case)
 /usr/local/apache/cgi-perl/.  Then when it's time to
 serve the content
 Apache notices that there's a handler installed for
 that location, the
 handler being mod_perl.  When it's handling requests
 for stuff to be
 served from that location, mod_perl gets the
 instruction to call
 Apache::Footer.  Apache::Footer just modifies the
 file and sends it on
 its way.  Similarly for Registry (presumably what
 used to be your CGI)
 scripts.  There's nothing wrong with the example in
 the Eagle Book.
 
 73,
 Ged.
 


__
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/



Apache::Leak ouput

2000-06-25 Thread Jason Nugent

Hi, folks,

I had a question regarding the output of Apache::Leak.  I'm testing a
perl module for memory leaks using this module, and I've wrapped my code
inside of a

leak_test {

}

statement.  My error_log file (where the output of the leak_test
function goes) ends up with a rather large number of the following bits
of information:

ENTER: 2740 SVs

new 0x827b018 : new 0x827b03c : new 0x827b048 : new 0x827b060   (many of
these).

LEAVE: 15609 SVs
ENTER: 15609 SVs
new 0x827b0e4 : new 0x827b378 : new 0x827b3b4 : new 0x81c91f8 : new
0x81c29f8 : old (1):
 0 old (1):
 0 old (1):
 0 old (1):
 0 old (1):
 0
LEAVE: 15609 SVs

So, I guess my question is how this all gets interpreted.  the perldoc
for Apache::Leak is a bit sparse, saying:

   use Apache::Leak;

   leak_test {
   my $obj = Foo-new;
   $obj-thingy;
   };
   #now look in error_log for results

so I was wondering if anyone in here had suggestions.

thanks, most appreciated.

Jason





Advanced Perl Book mailing list address

2000-06-25 Thread Geoffrey Gallaway

purl PATH is the Perl Advanced Techniques Handbook, by Mark Dominus.  It
  will probably be published in early 2001 by Morgan Kaufmann.
Send a
  message to mailto:[EMAIL PROTECTED] to receive
  occasional announcements and progress reports.


-- 
Geoffrey Gallaway || I dunno, I dream in Perl sometimes.
[EMAIL PROTECTED] ||
D e v o r z h u n ||-- Larry Wall




mod_perl and FastCGI, again

2000-06-25 Thread Kenneth Lee

Hi there,

Not performance. Not preference.

The question is, will mod_fastcgi and mod_perl conflict when both are 
compiled into Apache? Theoretically not I think. And what would the 
consequences be? Please comment.

Thanks.
Kenneth