Using mod_perl in a non httpd environment

2009-02-11 Thread titetluc titetluc
Hello all, I wrote a mod_perl module managing FORM authentication (and a lot of other things). This module had to run on a platform (router) with a lot of memory/CPU. These last days, our marketing team changed the platform definition (few memory, cheap CPU) In other words,

Re: [MP2] Problem when defining new directives in a container

2008-10-14 Thread titetluc titetluc
Any ideas ? Gaetan 2008/10/7 titetluc titetluc [EMAIL PROTECTED] Hello all, I am developing a new module which defines 2 new directives (TestDirective1 and TestDirective2). These directives are usable in a container (Location, Directory, ...). The following code defines the directives

[MP2] Problem when defining new directives in a container

2008-10-07 Thread titetluc titetluc
Hello all, I am developing a new module which defines 2 new directives (TestDirective1 and TestDirective2). These directives are usable in a container (Location, Directory, ...). The following code defines the directives : =BEGIN CODE= package

Re: [MP2]: strange behavior with Apache2::SubRequest::run

2008-09-25 Thread titetluc titetluc
Does anyone has additional documentation on Apache2::SubRequest::run and Apache2::SubRequest::status returned values ? Gaetan 2008/9/22 titetluc titetluc [EMAIL PROTECTED] 2008/9/19 Torsten Foertsch [EMAIL PROTECTED] On Fri 19 Sep 2008, titetluc titetluc wrote: Does your mod_perl one

Re: [MP2]: strange behavior with Apache2::SubRequest::run

2008-09-22 Thread titetluc titetluc
2008/9/19 Torsten Foertsch [EMAIL PROTECTED] On Fri 19 Sep 2008, titetluc titetluc wrote: Does your mod_perl one return Apache2::Const::REDIRECT at the end? No, the module returns Apache2::Const::MOVED_TEMPORARILY, setting the Location header by using $r-err_headers_out $ perl

Re: [MP2]: strange behavior with Apache2::SubRequest::run

2008-09-19 Thread titetluc titetluc
2008/9/18 Perrin Harkins [EMAIL PROTECTED] On Thu, Sep 18, 2008 at 10:31 AM, titetluc titetluc [EMAIL PROTECTED] wrote: I have 2 URIs returning HTTP_MOVED_TEMPORARILY The first one, /test_mod_perl is written using mod_perl The second one, /test_mod_cgi is written using CGI Does your

[MP2]: strange behavior with Apache2::SubRequest::run

2008-09-18 Thread titetluc titetluc
Hello all, I have 2 URIs returning HTTP_MOVED_TEMPORARILY The first one, /test_mod_perl is written using mod_perl The second one, /test_mod_cgi is written using CGI I call each of these URIs using a Apache2::SubRequest object my $subr1 = $r-lookup_uri('/test_mod_perl'); my $rc1 = $subr1-run();

[MP2]: Apache::FakeRequest for mod_perl 2

2008-09-17 Thread titetluc titetluc
Hello all, I am working in a mod_perl2 environment. I would like to use an equivalent of Apache::FakeRequest. Where can I find such a module ? Thanks

Re: [MP2]lookup_uri and HTTPS

2008-07-04 Thread titetluc titetluc
André, Torsten Thank you for your answer (sorry for the delay) No, Andre, your are not impertinent. I thought I had a problem related to the request scheme, but in fact, my httpd configuration was wrong !!! 2008/7/1 Torsten Foertsch [EMAIL PROTECTED]: On Tue 01 Jul 2008, titetluc titetluc

[MP2]how to catch the response body of a subrequest?

2008-07-01 Thread titetluc titetluc
Hello all, I am facing a problem: I would like to call sub-requests, but the content of these sub-requests should not 'pollute' the main request. Some times ago, Torsten Foertsch sent the same question on the mod_perl mailing list (see http://marc.info/?l=apache-modperlm=111720092815754w=2) The

Re: [MP2]how to catch the response body of a subrequest?

2008-07-01 Thread titetluc titetluc
Less than half an hour to have an answer And the code is correctly running (my work now is to understand this cryptic code ;-)) Thanks a lot 2008/7/1 Torsten Foertsch [EMAIL PROTECTED]: On Tue 01 Jul 2008, titetluc titetluc wrote: I am facing a problem: I would like to call sub

[MP2]lookup_uri and HTTPS

2008-07-01 Thread titetluc titetluc
Hello all, I am writing an handler generating sub-requests by using the lookup_uri and run (Apache2::SubRequest) methods. My question is : is it technically possible to generate HTTPS sub-request (I observed that sub-requests were using HTTP) using the mod_perl API ? If yes, which API do I have

Re: [MP2]mod_perl and index.html

2008-06-27 Thread titetluc titetluc
2008/6/26, Torsten Foertsch [EMAIL PROTECTED]: On Thu 26 Jun 2008, titetluc titetluc wrote: In PerlResponseHandler, $r-main and $r-prev are undefined. I can not understand why $r-main AND $r-prev are not defined (intuitively, $r-prev should be defined) I'd expect $r-user to be set

Re: [MP2]mod_perl and index.html

2008-06-27 Thread titetluc titetluc
2008/6/27, Rolf Schaufelberger [EMAIL PROTECTED]: Am Donnerstag, 26. Juni 2008 16:36:49 schrieb titetluc titetluc: sub set_user { my ($self, $r) = @_; Shouldn't that be sub set_user :method { my ($self, $r) = @_; When you use $r as second argument ? I am

Re: [MP2]mod_perl and index.html

2008-06-27 Thread titetluc titetluc
Torsten, I created a bug. Bug number is 45297https://issues.apache.org/bugzilla/show_bug.cgi?id=45297 Thank you very much for your help 2008/6/27, Torsten Foertsch [EMAIL PROTECTED]: On Fri 27 Jun 2008, titetluc titetluc wrote: Would it be rather a wrong httpd configuration: my requirement

Re: [MP2]mod_perl and index.html

2008-06-26 Thread titetluc titetluc
2008/6/25 titetluc titetluc [EMAIL PROTECTED]: Hello all I am writing a Perl module to authenticate users (using mod_perl2 and httpd 2.2.6. I would like to display the user name (r-user) when accessing a directory (/test_index/index.html) I have the following httpd configuration

Re: [MP2]mod_perl and index.html

2008-06-26 Thread titetluc titetluc
2008/6/26 Torsten Foertsch [EMAIL PROTECTED]: On Wed 25 Jun 2008, titetluc titetluc wrote: PerlModule Test Location /test_index/index.html Require valid-user AuthType basic AuthName test_index SetHandler perl-script PerlAuthenHandler Apache2::AuthSSO::Test

Re: [MP2]: setting group for a request (require group ...)

2008-06-23 Thread titetluc titetluc
-pnotes('groups'); and compare this to the authorized groups. I hope this helps. André titetluc titetluc wrote: Hello all, I am writing a mod_perl authentication module (My::Auth). This module sets the user using the Apache2::RequestRec::user method. package My::Auth; sub

[MP2]: setting group for a request (require group ...)

2008-06-19 Thread titetluc titetluc
Hello all, I am writing a mod_perl authentication module (My::Auth). This module sets the user using the Apache2::RequestRec::user method. package My::Auth; sub { $r-user('getting the user in my module internal structure'); return OK; } In the Apache configuration file, I can use the

Re: [MP2]: no access to the perl source when using the perl debugger

2008-06-04 Thread titetluc titetluc
2008/6/3, Perrin Harkins [EMAIL PROTECTED]: On Tue, Jun 3, 2008 at 4:51 AM, titetluc titetluc [EMAIL PROTECTED] wrote: The symptoms: the debugger is correcly called but does not dipslay the source script. Your guess is correct !!! I called Apache::DB-init() too late Thanks a lot for your

[MP2]: no access to the perl source when using the perl debugger

2008-06-03 Thread titetluc titetluc
Hello all, I am trying to use the perl debugger (using Apache mod_perl-2.0.2-6.3.el5 and httpd httpd-2.2.3-11.el). I followed the instructions in http://www.perl.com/pub/a/2006/02/09/debug_mod_perl.html and http://perl.apache.org/docs/1.0/guide/debug.html but the debugger does not run correctly.

[MP2][QUESTION]Adding handlers when defining a new directive

2008-04-29 Thread titetluc titetluc
Hello, I am writing a new mod_perl Apache (mod_perl2) to manage session tracking and SSO This module defines a new Apache directive (MyNewDirective), which is usable in a location, filesdirectory block. For example Location /a_test Set-Handler perl-script MyNewDirective a_test arg1 arg2

Re: [MP2][QUESTION]Adding handlers when defining a new directive

2008-04-29 Thread titetluc titetluc
It works ! Thanks a lot. One additionnal question: does the hook ordering work (according to the mod_perl documentation, it does not !) ? Gaetan 2008/4/29, Philippe M. Chiasson [EMAIL PROTECTED]: titetluc titetluc wrote: Hello, I am writing a new mod_perl Apache (mod_perl2) to manage

[MP2][QUESTION]Attribute::Handlers usage with mod_perl

2008-02-20 Thread titetluc titetluc
Hello all, I would like to use attributes (Attribute::Handlers) in a mod_perl module. I defined my attribute: use Attribute::Handlers; sub Catch_error ATTR(CODE, BEGIN) { ... } My module uses this attribute: sub foo :Catch_error{ } But this does not work. I searched in the mod_perl mailing

[MP2][QUESTION]Apache::Handler usage with mod_perl

2008-02-15 Thread titetluc titetluc
Hello all, I would like to use attributes (Attribute::Handlers) in a mod_perl module. I defined my attribute: use Attribute::Handlers; sub Catch_error ATTR(CODE, BEGIN) { ... } My module uses this attribute: sub foo :Catch_error{ } But this does not work. I searched in the mod_perl mailing

Re: [MP2][QUESTION]Session and inactivity

2008-02-13 Thread titetluc titetluc
2008/2/13, Perrin Harkins [EMAIL PROTECTED]: On Feb 13, 2008 2:03 AM, titetluc titetluc [EMAIL PROTECTED] wrote: By pooling, I mean the fact that expired sessionS have to be REGULARLY purge (in opposed to a callback mechanism (IMHO, the best solution ). This callback would be called

Re: [MP2][QUESTION]Session and inactivity

2008-02-12 Thread titetluc titetluc
2008/2/11, Perrin Harkins [EMAIL PROTECTED]: On Feb 11, 2008 11:10 AM, titetluc titetluc [EMAIL PROTECTED] wrote: From your previous answers, I conclude that there is no way to suppress a session automagically by using the mod_perl API (unless using XS to implement a monitor hook

Re: [MP2][QUESTION]Session and inactivity

2008-02-07 Thread titetluc titetluc
Hello all, 2008/2/6, titetluc titetluc [EMAIL PROTECTED]: Oups I answered directly to Torsten by error Here is my answer and the reply 2008/2/6, Torsten Foertsch [EMAIL PROTECTED]: On Wed 06 Feb 2008, titetluc titetluc wrote: The module I am developing has to delete the cookie

[MP2][QUESTION]Session and inactivity

2008-02-06 Thread titetluc titetluc
Hello mod_perl users, I am developing a mod_perl module (MyModule) to manage sessions/authentication. This module: - uses Apache::Session to store session-related information - is cookie-based - manages session inactivity This module could be used in the following example.

Re: [MP2][QUESTION]Session and inactivity

2008-02-06 Thread titetluc titetluc
Oups I answered directly to Torsten by error Here is my answer and the reply 2008/2/6, Torsten Foertsch [EMAIL PROTECTED]: On Wed 06 Feb 2008, titetluc titetluc wrote: The module I am developing has to delete the cookie if it is not refreshed regularly. The question: how can I manage

Re: [MP2] [QUESTION] authentication modules (reuse of mod_auth_basic, mod_auth_digest, mod_auth_ntlm) and cookies

2008-01-30 Thread titetluc titetluc
Thank you for your answer Rafael My comments are below 2008/1/29, Rafael Caceres [EMAIL PROTECTED]: Gaetan: On Tue, 2008-01-29 at 10:51 +0100, titetluc titetluc wrote: Hello all Apache mod_perl2 module experts (I am a newbie with Apache), Hope I am clear in my explanations (my English

[MP2] [QUESTION] authentication modules (reuse of mod_auth_basic, mod_auth_digest, mod_auth_ntlm) and cookies

2008-01-29 Thread titetluc titetluc
Hello all Apache mod_perl2 module experts (I am a newbie with Apache), Hope I am clear in my explanations (my English is not so good and I had a lot of problems explaining my needs by mail. I am not sure that everybody will read entirely this mail ;-))) The direct question: Is it possible