Re: Reading email with mod_perl

2001-02-08 Thread Glorfindel

Hi

Check MIME::Parser ( recent version to avoid error with bad use of date.pm instead of 
Date.pm )

Jason Terry wrote:

 Does anybody have an information on how to read a MIME encoded email attachment with 
mod_perl?

--
Don't be irreplaceable, if you can't be replaced, you can't be promoted.






About custom_respons and Internal redirect

2001-01-29 Thread Glorfindel


Hi all,
We'we write a simple package with a simple sub "Die" which handle
application error ( warning in fact ... )

   MyErrorPkg::Error-set( $code[0], $code ); ( set the error message,
which will be fetched in error.epl )
my $r = Apache-request()
  || return;
if ( $r-method() eq "POST" ){   # Take care with
posted request when using internal redirect...
  $r-method('GET');
  $r-method_number(M_GET);
  $r-headers_in-unset('Content-length');
 }
# here is what I don't undestand 
if ( $r-uri() =~ /\.epl$/  ){
  $r-internal_redirect( "/common/error.epl" );
  exit( 0 );
}else{
  $r-custom_response( OK, "/common/error.epl" );
  exit( 0 );
}

I have two questions:
1)
When I perform an internal redirect I within a epl ( HTML::Embperl )

page, internal redirect works well.

But within our customized handler ( mod_perl ), we have to perform a

custom_response

Calling a custom_response in epl ( HTML::Embperl ), send us a to a
blank page.

What is the difference betwenn these two calls

2) In all case we have to call exit( 0 ), if not the first
processing ( not process ) still finish. I was thinking that calling
internal_redirect was stopping the current processing, was I wrong?

   Thank's



--
Don't be irreplaceable, if you can't be replaced, you can't be promoted.






Re: location not working

2001-01-10 Thread Glorfindel

Hi all,

Is your Apache::Hello loaded?
( look at perl-status )

If not

Replace PerlHandler Apache::Hello
By  perlHandler +Apache::Hello

Is your handler perform an internal_redirect?


[EMAIL PROTECTED] wrote:

 Following the beginners directions in Stein and MacEachern(SM),

 I have built mod_perl 1.24_01for apache 1.3.14 on AIX.
 I checked the perl.conf is being read.

 My perl.conf contains: (according to page 31 of SM)
 (Note: I have changed less-than to [ so that html-style mail and newreaders will
 show the symbol.)
 [Location /hello/world
  SetHandler perl-script
  PerlHandler Apache::Hello
 [/Location

 and I have Hello.pm in /usr/local/apache/lib/perl/Apache

 all according to SM instruction.

 NEVERTHELESS, I get 404 when I enter
  http://myserver//hello/world
 and it is looking in the htdocs directory according to the error_log.

 httpd -l
 shows we are running with mod_perl.c, and putting a
 syntax error in startup.pl confirms that we are reading that file.

 All the directory are rwx and the files are all readable.

 What am I doing wrong?

--
Don't be irreplaceable, if you can't be replaced, you can't be promoted.






Re: Where can I find....

2000-12-29 Thread Glorfindel

Look at the RFC of HTTP
Michael wrote:

 Where can I find documentation on the how to use all the values that
 appear in Apache::Constants

 The obviously do something, but what???
 I figured out what OK, DECLINED do by reading the source, but what
 about all the rest. Are they described somewhere??

 [EMAIL PROTECTED]

--
Don't be irreplaceable, if you can't be replaced, you can't be promoted.






Re: POST with PERL

2000-12-21 Thread Glorfindel

Hi,

You should not try to post TO a flat html filebut only FROM it.


Hope it help.


[EMAIL PROTECTED] wrote:

 Hi!

 I have a little problem. A wrote a perl-script to manage guestbook-like
 section of my page. Script is working, but from the shell. When I try to
 post a data through html form I get an error saying that post method is
 not suported by this document. It's in directory with options ExecCGI and
 FollowSymLinks. There is also a script handler for .cgi. What's the
 matter?
 Thanks from advance

 IronHand   mailto:[EMAIL PROTECTED]

--
Don't be irreplaceable, if you can't be replaced, you can't be promoted.






Re: Determining memory available for cache

2000-11-25 Thread Glorfindel

[EMAIL PROTECTED] wrote:

 This mail is probably naive. Sorry.


Not so naive !


 I want to set up a cache, storing html templates and perl widgets (held
 in MySQL) that are regularly eval'd. I want to attach timestamps and hit
 counts to each stored scalar, to help decide which are the most
 important values to cach, and allow updates to the cache if values are
 changed. I'm also looking at IPC::Cache.

 Now, I only have 128MB RAM. When I'm populating the hash, I can limit
 the size of the cache to available RAM by reading freemem from
 /proc/meminfo, so I don't run into swap space.

 However, when I undef a range of hash values, the free memory in
 /proc/meminfo doesn't increase - it seems permanently allocated.


As far as I know, kernels are not able to desallocate ( ! ) memory segment,
exept when the allocating process die.


 Does anyone have any thoughts on how I can judge whether I have space to
 add a value to a cache, or whether I need to clean out unused vales from
 the cache.


You could at server startup store the size of free mem as MEN_FREE of your
system, set the max size of each httpd process at SIZE_PER_MAX_HTTPD ( cf
Apache::SizeLimit ), the maxclient to MAX_CLIENT ( cf your httpd.conf )

Then with the size of CACHED_DATA you should take some decisions.

Hopes it help...



--
Don't be irreplaceable, if you can't be replaced, you can't be promoted.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: AuthCookie

2000-11-25 Thread Glorfindel

Kiran Kumar wrote:

 Hi,
   I have Installed AuthCookie Module but it does not work on netscape (4.7)
 but works on IE .
In netscape  after I logout and later i req

Hello all,

 uest a protected page i still
 get the page ,Can anyone help me on this .

netscape could cache the requested page page
look the cookie send ( set warn when accepting cookie ) on unlog



 Thanks in advance

 Kiran

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

--
Don't be irreplaceable, if you can't be replaced, you can't be promoted.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]