Re: Help -- how to fork an Apache process in mod_perl safely? Not Apache2:Subprocess...

2009-09-12 Thread Victor Danilchenko
it's safer that way, I suppose. On Aug 25, 2009 5:12 AM, "Victor Danilchenko" <mailto:vic...@askonline.net>> wrote: Hi all, I need to be able to fork an Apache process in daemon form, to do some housekeeping which might potentially take a few seconds. Howev

Help -- how to fork an Apache process in mod_perl safely? Not Apache2:Subprocess...

2009-08-25 Thread Victor Danilchenko
or how to solve this without forking (e.g. is there a way to 'append' a function call to the request after the rest of the request is completed)? Many thanks in advance. -- Victor Danilchenko Senior Software Engineer, AskOnline.net vic...@askonline.net - 617-273-0119

Re: Help -- how can I make the Apache process die at the end of the request?

2008-12-09 Thread Victor Danilchenko
Adam Prime wrote: Victor Danilchenko wrote: I need to do it forcibly, no matter what happens during the request. I have to slightly relax security constraints to call an unusual subrequest, and since I cannot guarantee that the cleanup code will be reached (what if the subrequest is

Help -- how can I make the Apache process die at the end of the request?

2008-12-04 Thread Victor Danilchenko
trick the parent process into terminating this one after the request completes? or is there some mod_perl feature which tells mod_perl to not re-use the perl runtime in a given process? Any help and/or ideas are much appreciated. Thanks in advance. -- Victor Danilchenko

Re: A question about wiring up filehandles for direct dump to HTTP pipe

2008-02-22 Thread Victor Danilchenko
half of it is constructing the 404 responder. Torsten Foertsch wrote: On Fri 22 Feb 2008, Victor Danilchenko wrote: or to grab a given file from disk? Perhaps $r->sendfile($filename)? Defined in Apache2::RequestIO. -- Victor Danilchenko Senior Software Engin

Re: A question about wiring up filehandles for direct dump to HTTP pipe

2008-02-22 Thread Victor Danilchenko
Torsten Foertsch wrote: On Fri 22 Feb 2008, Victor Danilchenko wrote: or to grab a given file from disk? Perhaps $r->sendfile($filename)? Defined in Apache2::RequestIO. There is precious little documentation on it, so I will have to experiment with it a little, but this sounds like

Re: A question about wiring up filehandles for direct dump to HTTP pipe

2008-02-22 Thread Victor Danilchenko
Michael Peters wrote: Victor Danilchenko wrote: Is there any way, to, uhhh, tell Apache programatically to simply slurp up the file from an open filehandle I could be wrong, but I doubt you can pass a Perl file handle to a C program that is not Perl aware (like Apache). I am hoping

A question about wiring up filehandles for direct dump to HTTP pipe

2008-02-22 Thread Victor Danilchenko
irect to the real location is less than ideal precisely because that will open a door to the circumvention of this accounting script, a door which will be rather hard to close. Any ideas or alternative solutions are welcome. Thanks in advance. -- Victor Danilc

Re: Help with $r being corrupted

2007-05-04 Thread Victor Danilchenko
turn DONE; } ... You might be able to work around it by doing something like this though now that i think about it. sub handler { my $r = shift; if ( !ref($r) || (ref($r) ne 'Apache' && ref($r) ne 'Apache::Request' && ref($r) ne 'Apache::Filter'

Re: Help with $r being corrupted

2007-05-04 Thread Victor Danilchenko
Perrin Harkins wrote: On 5/2/07, Victor Danilchenko <[EMAIL PROTECTED]> wrote: I suspect this is a Perl issue, as I have noticed that generally, funny things seem to occasionally happen with the symbol table (i.e. methods getting forgotten ever once in a while) in the perl cod

Re: Help with sending custom headers in mod_perl2

2007-05-04 Thread Victor Danilchenko
Someone (you know who you are, thanks!) helped me off-list by pointing out that I should use HTTP status 301 with Location header instead. In retrospect, it should have been obvious that the behavior I desired is meaningless in the context of Refresh header. D'oh. Victor Danilchenko

Re: Help with sending custom headers in mod_perl2

2007-05-04 Thread Victor Danilchenko
Perrin Harkins wrote: On 5/2/07, Victor Danilchenko <[EMAIL PROTECTED]> wrote: I seem to be missing something very obvious... I have: $r->header_out("Refresh"=>"0; URL=$uri\n"); I think you're looking for this: $r->headers_out->add("

Re: Help with $r being corrupted

2007-05-03 Thread Victor Danilchenko
Frank Wiles wrote: Actually it isn't an issue of methods being forgotten, more likely you aren't using Apache2::RequestUtil in your code. Preferably preloading it. Well, the production code which has this problem is running under mod_perl 1 and Apache 1.3 right now, but I do load

Re: Help with sending custom headers in mod_perl2

2007-05-02 Thread Victor Danilchenko
occurs. I do not get this extra delay when I simply submit the refresh as a header, so this seems to be an artifact of the HTTP transaction in some way. Victor Danilchenko wrote: I seem to be missing something very obvious... I have: $r->header_out("Refresh"=>&quo

Help with $r being corrupted

2007-05-02 Thread Victor Danilchenko
Hi all, I have a custom handler which is supposed to do some stuff with the request, and run it through the Mason parser. The trouble is that ever once in a while -- rarely -- the request object comes to my handler method corrupted. The error I usually get is that dir_config method is

Help with sending custom headers in mod_perl2

2007-05-02 Thread Victor Danilchenko
I seem to be missing something very obvious... I have: $r->header_out("Refresh"=>"0; URL=$uri\n"); $r->send_http_header; print "Test redirect => $uri\n"; But when the redirect page gets submitted, the HTTP headers show up as page contents: Keep-Alive: timeout=15, max=99 Connection: K