Re: refactoring client's decision

2008-05-12 Thread Foo JH
Creating packages with the same name for multiple sites is generally a 
recipe for confusion. Following what Michael Peters said, the better way 
will be to create a properly namespaced package instead.


But in the event that the right thing cannot be done, you can consider 
creating a new interpreter for each site with the Options +Parent config 
in Apache. Do note that this solution may be memory intensive, and will 
not scale as broadly as a shared interpreter.


IMHO, try to get things right the first time. It's usually more painful 
to revisit a quick-fix.




Marc Lambrichs wrote:
I've taken over some code for a client. They've built a framework that 
used to run under mod_perl and changed it later, because of problems 
they had - what problems remains unknown - to cgi. Ofcourse I'm 
curious why they changed it. Here's my view: they create a parent 
App::Handler and in every virtual host they create a Site::Handler 
which has App::Handler as base. My first guess is that under mod_perl 
you don't know which Site::Handler will be called. Ofcourse, at first, 
the handler you're actually pointing to will be called, but if you 
change the request to another virtualhost, the wrong handler will be 
called.


This would explain why it's running perfectly under cgi, because in 
every script call the correct lib path is defined.


So, my first question is: am I right?
Secondly, what if we're running the cgi under speedycgi?

Thx,
Marc




Re: refactoring client's decision

2008-05-12 Thread Perrin Harkins
On Sun, May 11, 2008 at 2:52 AM, Marc Lambrichs
<[EMAIL PROTECTED]> wrote:
>  Secondly, what if we're running the cgi under speedycgi?

You can do this with FastCGI if you run a different FastCGI backend
for every virtualhost.  The same thing would work with mod_perl if you
run a different mod_perl-enabled backend apache for each virtualhost
and proxy to them from the frontend apache.

- Perrin


Re: Issue with Auth Handler

2008-05-12 Thread Fred Moyer

Tracy12 wrote:

Strange thing is it shows some cookie information and in the end it shows

Connection: close

Content-Length: 0


Why it is showing Content-Length: 0

Do I have to explicitly handle the headers? or do I have to  
$r->send_http_header;


This is only needed for mod_perl 1.x series.

If you can show us some code snippets, that would help a lot.  It's hard 
to say what is wrong without them :)




I thought I dont need to do any of those as everything willl be handled
implicitly

THanks





Tracy12 wrote:

Hi,

We developed a mod_perl auth handler, everything seem to be working fine,

But when the request reaches the final destination, the header information
is lost, 


We have mod_perl 2.0.2 on Apache 2.x

Can some one give us a hint which configuration setting would do this
culprit or what is the setting or
entry do we need to have this header information preserved in mod_perl

Thanks









--
Red Hot Penguin Consulting LLC
mod_perl consulting and implementation
http://www.redhotpenguin.com/