Re: maintaining shared memory size

2005-08-31 Thread Badai Aqrandista
> POE sounds good to start with, right? For a daemon to monitor a queue? Probably not. I'd just write a simple script that polls a database table and forks a new process to handle any jobs it finds. Parallel::ForkManager is handy for this kind of thing. Yes. POE looks overkill compare to P

Re: maintaining shared memory size

2005-08-31 Thread Badai Aqrandista
My app is an online hotel booking system. That part is the part where it searches availabilities through all combination of dates, number of guests, rooms, packages, allotments, pricing structures, and more. This doesn't sound like a "search" at all. Typically individuals know at least SOMETHI

Re: Apache::Test not finding global config file

2005-08-31 Thread Geoffrey Young
William McKee wrote: > On Wed, Aug 31, 2005 at 11:54:57AM -0400, Geoffrey Young wrote: > >>$self->{httpd_basedir}, which looks to be calculated based on the location >>of the httpd binary. but it looks like it ought to be using HTTPD_ROOT >>instead. at least if it's defined. >> >>try this (com

Re: Suggestions for creating an archive

2005-08-31 Thread Dermot Paikkos
Excellent. I give it a try tomorrow. Dp. On 31 Aug 2005 at 13:48, Michael Peters wrote: > > > Perrin Harkins wrote: > > On Wed, 2005-08-31 at 18:38 +0100, Dermot Paikkos wrote: > > > >>Do you mean a redirect to a completely separate handler or cgi? > > > > > > I mean a standard redirect

Re: Apache::Test not finding global config file

2005-08-31 Thread William McKee
On Wed, Aug 31, 2005 at 11:54:57AM -0400, Geoffrey Young wrote: > $self->{httpd_basedir}, which looks to be calculated based on the location > of the httpd binary. but it looks like it ought to be using HTTPD_ROOT > instead. at least if it's defined. > > try this (completely untested) Perfect!

Re: Suggestions for creating an archive

2005-08-31 Thread Mike Whitaker
On 31 Aug 2005, at 18:43, Perrin Harkins wrote: There is a way to do it, defined as part of HTTP or MIME -- I can't quite remember. If you do an external redirect you won't have to bother figuring it out. Content-Disposition: rings a bell.

Re: Suggestions for creating an archive

2005-08-31 Thread Michael Peters
Perrin Harkins wrote: > On Wed, 2005-08-31 at 18:38 +0100, Dermot Paikkos wrote: > >>Do you mean a redirect to a completely separate handler or cgi? > > > I mean a standard redirect to a normal .zip file, which you let apache > serve for you like any other file. Then you clear these out > pe

Re: Suggestions for creating an archive

2005-08-31 Thread Perrin Harkins
On Wed, 2005-08-31 at 18:38 +0100, Dermot Paikkos wrote: > Do you mean a redirect to a completely separate handler or cgi? I mean a standard redirect to a normal .zip file, which you let apache serve for you like any other file. Then you clear these out periodically with a cron job. > So I gues

Re: maintaining shared memory size

2005-08-31 Thread colin_e
Badai Aqrandista wrote: ...Your requests take 110 seconds each? What is your application doing? My app is an online hotel booking system. That part is the part where it searches availabilities through all combination of dates, number of guests, rooms, packages, allotments, pricing structur

Re: Suggestions for creating an archive

2005-08-31 Thread Dermot Paikkos
On 31 Aug 2005 at 13:14, Perrin Harkins wrote: > On Wed, 2005-08-31 at 18:09 +0100, Dermot Paikkos wrote: > > $r->internal_redirect("myzip.zip"); > > That's supposed to be a URL: "/myzip.zip" > > I was actually thinking of an external redirect, but an internal > redirect should work. Do you mea

Re: Multiple Handlers

2005-08-31 Thread Martin Moss
It doesn't seem to work... This was the original solution I tried.. Here is the code:- if (Apache->can('set_handlers')) { print STDERR "CAN PUSH HANDLERS OK\n"; } else { print STDERR "CANNOT PUSH HANDLERS OK\n"; } my $list = $r->get_handlers( 'PerlHandler'

Re: Suggestions for creating an archive

2005-08-31 Thread Mike Whitaker
On 31 Aug 2005, at 17:40, Perrin Harkins wrote: On Wed, 2005-08-31 at 17:18 +0100, Dermot Paikkos wrote: I need to create a archive file and send it back to the user. Either do a system call to zip, or use Archive::Zip, write the file out in a directory under your web server, and send a

Re: Suggestions for creating an archive

2005-08-31 Thread Perrin Harkins
On Wed, 2005-08-31 at 18:09 +0100, Dermot Paikkos wrote: > $r->internal_redirect("myzip.zip"); That's supposed to be a URL: "/myzip.zip" I was actually thinking of an external redirect, but an internal redirect should work. - Perrin

Re: Suggestions for creating an archive

2005-08-31 Thread Dermot Paikkos
On 31 Aug 2005 at 12:40, Perrin Harkins wrote: Sorry I guess that should be $r->internal_redirect("http://austin/Myzip.zip";); That what the bad uri means. Still my archive file arrives empty even though the actual archive in /var/www/htdocs has files files in it. Dp. ~~ Dermot Paikkos * [E

Re: Suggestions for creating an archive

2005-08-31 Thread Dermot Paikkos
I had tried Archive::Zip earlier but gave up after this error. Here what I have at the moment.: ...snip my $zip = Archive::Zip->new(); my $member = $zip->addDirectory('myarchive/'); chdir("$dir") or die "Can't cd into $dir: $!\n"; my @jpegs = glob("*.jpg"); foreach my $f (@jpegs) { $me

Re: Multiple Handlers

2005-08-31 Thread Geoffrey Young
Martin Moss wrote: > Have an awful suspicion the book I used suggested > doing it the other way around? Would that make a > difference? > > $r->handler('perl-script'); > $r->set_handlers(PerlHandler => [ My::Handler ]); none whatsoever. keep in mind that you can only call set_handlers() during

Re: Multiple Handlers

2005-08-31 Thread Martin Moss
Have an awful suspicion the book I used suggested doing it the other way around? Would that make a difference? $r->handler('perl-script'); $r->set_handlers(PerlHandler => [ My::Handler ]); Marty --- Geoffrey Young <[EMAIL PROTECTED]> wrote: > > > > I originally tried using $r->set_handlers.

Re: Multiple Handlers

2005-08-31 Thread Geoffrey Young
> I originally tried using $r->set_handlers. in my > PerlAuthenHandler. But this made absolutely no > difference to the current request... if you want to set_handlers() for the PerlHandler phase you need two calls $r->set_handlers(PerlHandler => [ My::Handler ]); $r->handler('perl-script')

Re: Suggestions for creating an archive

2005-08-31 Thread Perrin Harkins
On Wed, 2005-08-31 at 17:18 +0100, Dermot Paikkos wrote: > I need to create a archive file and send it back to the user. Either do a system call to zip, or use Archive::Zip, write the file out in a directory under your web server, and send a redirect to the newly written file. - Perrin

Re: maintaining shared memory size

2005-08-31 Thread Perrin Harkins
On Wed, 2005-08-31 at 14:13 +1000, Badai Aqrandista wrote: > Lots of SQL queries and calculation based on the query results. I've cached > most of the query results, but the calculation results can't be cached > because they depend on user inputs. If this is serious number-crunching, it might be

Suggestions for creating an archive

2005-08-31 Thread Dermot Paikkos
Hi, Apologises if this is a little OT but I am can't seem to find anything relevant elsewhere. I am currently using MP1, 1.29 on Linux. I need to create a archive file and send it back to the user. The files within the archive will be jpegs so compression isn't needed, but I need the archive so

Multiple Handlers

2005-08-31 Thread Martin Moss
All, I'm trying to make something work in mod perl, and all the docs seem to be pointing me in ways which just don't work on our system... Server version: Apache/1.3.33 (Unix) SunOS 5.9 perl, v5.8.6 I wish to have a handler which sits after the Authentication stage, which can choose whether to d

Re: Apache::Test not finding global config file

2005-08-31 Thread Geoffrey Young
> I want it to find /etc/httpd/2.0/conf/httpd2.conf but it is finding: > > [ debug] isolated httpd_defines HTTPD_ROOT = /etc/httpd/2.0 > [ debug] isolated httpd_defines SERVER_CONFIG_FILE = conf/httpd2.conf > [ debug] inheriting config file: /usr/conf/httpd2.conf > > I'd love to figure out wh

Re: Apache::Test not finding global config file

2005-08-31 Thread William McKee
On Thu, Aug 25, 2005 at 06:56:57PM -0400, Philip M. Gollucci wrote: > >From the trace below, you can see that A::T thinks the config file is > >'/usr/conf/httpd2.conf': > > [ debug] isolated httpd_defines HTTPD_ROOT = /etc/httpd/2.0 > > [ debug] isolated httpd_defines SERVER_CONFIG_FILE = con

Re: Apache::Test not finding global config file

2005-08-31 Thread William McKee
On Thu, Aug 25, 2005 at 06:59:56PM -0400, Philip M. Gollucci wrote: > To answer your original quesiton, > you want: > in A-T source, Thanks for the reference. Some further investigating showed that calling t/TEST -clean is when I lose the -httpd_config setting which explains why `./Build test` is

Re: [PATCH] DBI::ProfileDumper::Apache ported to mp2 RC5+

2005-08-31 Thread Tim Bunce
[I wrote this over a week ago but queued it waiting till I submitted the changes. That's still not happened yet so I'll just post it anyway.] On Sun, Aug 21, 2005 at 05:22:34PM -0400, Philip M. Gollucci wrote: > Hi, > > On Sun, Aug 21, 2005 at 01:59:34PM -0400, Sam Tregar wrote: > >Very cool! On

Re: maintaining shared memory size (was: Re: swampedwithconnection?)

2005-08-31 Thread David Hodgkinson
On 30 Aug 2005, at 10:16, Badai Aqrandista wrote: I used to use A::S::MySQL, but it created 2 connections for every process. This caused 'Too many connections' error. So I tried to use memcached. Now that I know how to make one connection per process (using database.table identifier on al