Re: Different handlers in different NameVirtualHosts?

2002-12-05 Thread Damyan Ivanov
On Wed, Dec 04, 2002 at 11:37:20AM +0200 /me wrote:
 I am having trouble setting different Perl*Handler's for two different
 VirtualHosts. The virtual hosts use one IP and are name-based.
[... details skipped ...]

It works. It was me that's wrong. PerlFixupHandlers work just as
expected with named virtual hosts.

For the record - here's the source of my troubles.

I have two classes that need to be single-instance within the
application. the signle-ness is implementent in a parent class which
creates new instance only if there is no previous one.

Trouble begins when asking the second application derived class to
create an instance and its parent returns the instance of the first
class.

Fixing the parent to cache one instance _per class_ solves the problem.

I knew it's me who is wrong, not mod_perl...

Funny thing is that the silence on the list made me think :-)))


dam

-- 
Damyan Ivanov Creditreform Bulgaria
[EMAIL PROTECTED] http://www.creditreform.bg/
phone: +359 2 928 2611, 929 3993   fax: +359 2 920 0994
mobile: +359 88 566067 ICQ: 3028500



msg31627/pgp0.pgp
Description: PGP signature


Different handlers in different NameVirtualHosts?

2002-12-04 Thread Damyan Ivanov
[apache-1.3.26/mod_perl-1.27 from Debian/unstable]

Hello,

I am having trouble setting different Perl*Handler's for two different
VirtualHosts. The virtual hosts use one IP and are name-based.

configuration is as follows:

Port 80
Bind 10.0.0.1
NameVirtualHost 10.0.0.1
PerlRequire /etc/apache-perl/startup.pl

VirtualHost 10.0.0.1
ServerName test1.domain

...
PerlFixupHandler App1::Setup
...
/VirtualHost

VirtualHost 10.0.1.1
ServerName test1001.domain
...
PerlFixupHandler App1001::Setup
...
/VirtualHost

According to Apache Name Virtual Host docs, this is the right way to
setup name-based virtual hosts (imho).

When I try to access test1.domain everithing works fine. If I try to
access test1001.domain after that - I get App1::Setup invoked,
instead of App1001::Setup

after a restart I am able to work with test1001.domain correctly, but
after that test1.domain invoces App1001::Setup again.

Is this as designed? Is it possible to run multiple applications with
different Perl*Handlers using virtual hosts? Any readings I've missed?


Thanks in advance.
dam

-- 
Damyan Ivanov Creditreform Bulgaria
[EMAIL PROTECTED] http://www.creditreform.bg/
phone: +359 2 928 2611, 929 3993   fax: +359 2 920 0994
mobile: +359 88 566067 ICQ: 3028500



msg31599/pgp0.pgp
Description: PGP signature


Re: getting the PID for a request

2002-10-21 Thread Damyan Ivanov
On Thu, Oct 17, 2002 at 03:56:55PM +0530 Sylbert L wrote:
 Is there any way I can get the Process Id or thread ID for a particular
 process / thread that is handling my request ? thanks a bunch ..

What's wrong with $$ ?
 

dam

-- 
Damyan Ivanov Creditreform Bulgaria
[EMAIL PROTECTED] http://www.creditreform.bg/
phone: +359 2 928 2611, 929 3993   fax: +359 2 920 0994
mobile: +359 88 566067




Re: getting the PID for a request

2002-10-18 Thread Damyan Ivanov
On Thu, Oct 17, 2002 at 03:56:55PM +0530 Sylbert L wrote:
 Is there any way I can get the Process Id or thread ID for a particular
 process / thread that is handling my request ? thanks a bunch ..

What's wrong with $$ ?

-- 
dam




Re: alarms

2002-04-10 Thread Damyan Ivanov

On Thu, Apr 11, 2002 at 12:30:53AM +0800 Stas Bekman wrote:
 mire wrote:
 I wish to know 2 things about mod_perl
 
 1) what happens when you set an alarm for lets say 30 seconds and the 
 request
 finishes in 20 ? Since apache child is very likely still alive is mod_perl 
 too ?
 
 You don't set alarm around the request, do you? You set the alarm for a 
 certain code snippet and you reset it to 0 when it's done before the 
 alarm went off. For runaway process control, see Apache::Watchdog::RunAway

OK, but I am really curious. What really happens if I intentionally set
the alarm to ring after the request has finished? For example if I want
something to hapen if apache child is idle for more than 15 minutes.


-- 
Damyan