Re: newbie query

2003-12-15 Thread victor
... IMHO, you should start with CGI.pm, it is simpler to understand and program. As you gain your understanding with perl and CGI, try convert your program to be mod_perl friendly and then start running your CGI off mod_perl, and only after you gain some experience running mod_perl would I sug

What do you think?

2004-01-06 Thread victor
Came across this message on the freebsd stable list today, I wonder what does it mean to my mod_perl server running in FreeBSD, will recompiling perl with perl's malloc turned on squeeze even more performance out of my mod_perl server? Thanks. Tor. -- --- Begin Message --- On Tue, 06 Jan 200

debugging run away httpd process

2004-10-14 Thread victor
Hello everyone, This might be a bit off topic, please kindly forgive me, I am seeking some tips on debuging mod_perl script, I have a mod_perl enabled apache server running all kinds of perl scripts. Lately after a pitty major script update, I notice some apache children would chew up all CPU

Re: debuging run away httpd process

2004-10-15 Thread victor
Hi malcolm, Malcolm J Harwood wrote: On Thursday 14 October 2004 04:23 am, Victor Tsang wrote: We use mod_perl heavily here, and lately I notice some apache children for some reason chew up large amount of cpu (indeed all cpu). Using apache's server-status i can tell it is one of th

Re: debugging run away httpd process

2004-10-15 Thread victor
Hello Brian, thanks for your reply, On Thu, Oct 14, 2004 at 12:07:17PM +0800, victor wrote: 2) Why strace doesn't return anything? or is strace the appropiate tool to use at all? is there any mod_perl module/option I should turn on/off/tweak to help me find out what the process is

Re: debugging run away httpd process

2004-10-18 Thread victor
Brian Reichert wrote: On Fri, Oct 15, 2004 at 10:46:01AM +0800, victor wrote: How are you invoking strace? As root I ran /usr/bin/strace -p There are other useful arguments to strace; see the manpage for '-f -F -v', and so forth. I haven't tried -v before, l

Re: debuging run away httpd process

2004-10-18 Thread victor
I've no idea what stability impact the profiler would have. It does impact CPU usage and memory consumption, it also generates potentially very large log files if it's running for any significant amount of time. You also have to shut the server down to finalise the profile logs (otherwise they

Re: mod_gzip + LogHandler

2004-12-16 Thread victor
Thanks slava, I will give that gzip handler a try. Tor. Slava Bizyayev wrote: Hi Victor, On Wed, 2004-12-15 at 02:11, victor wrote: The functoin served me well until I start enabling mod_gzip for apache. It appears that with mod_gzip turned on, the Environment I have setup for some reason

mod_gzip + LogHandler

2004-12-15 Thread victor
Hi, I have been using log handler to setup some Environment variable to be logged into apache log with a customized log format. ie. In apache conf -- ... PerlLogHandler My::Logger ... LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\ \"%{username}e\"" custom2 in s

Problem using Cleanuphandler for SizeLimit

2005-03-04 Thread victor
Hello everyone, I just bump into something strange I wonder if anyone else here have experienced it or better have a fix. I have been using SizeLimit with FixupHandler since day one and it has been working wonderful, recently I noticed the documention have been changed now the CleanupHandler be

Re: Problem using Cleanuphandler for SizeLimit

2005-03-07 Thread victor
particular request is for, we use it for debugging. Is there anything in these 2 functions that can possibly do something to the cleanup handler? Many thanks. Tor. Perrin Harkins wrote: On Fri, 2005-03-04 at 17:24 +0800, victor wrote: I have been using SizeLimit with FixupHandler since day one and

Re: Problem using Cleanuphandler for SizeLimit

2005-03-07 Thread victor
or. Perrin Harkins wrote: On Mon, 2005-03-07 at 14:06 +0800, victor wrote: This is all I have in the config file PerlFreshRestartOn Can you try without that? I strongly advise against using PerlFreshRestart. It can cause some very mysterious bugs. Perl just isn't built to ha

Using Cache::Mmap in mod_perl

2004-07-18 Thread Victor Tsang
Has anyone tried using Cache::Mmap in mod_perl? I have some virtualhost related data I would like to share amoung the apache children, a quick lookup at cpan.org I find this Cache::Mmap module which seems to fits my need just right. I have written a perl code to test my design off apache, it work

Re: Using Cache::Mmap in mod_perl

2004-07-20 Thread Victor Tsang
plain _lock.al Can't locate auto/Cache/Mmap/_lock.al in @INC anyways, maybe I should try reinstall mod_perl first and see if that fixes the problem. Many thanks. Tor. On Mon, 19 Jul 2004 11:59:45 +0100, Peter Haworth <[EMAIL PROTECTED]> wrote: > On Mon, 19 Jul 2004 11:57:56 +0800,

Re: Using Cache::Mmap in mod_perl

2004-07-20 Thread Victor Tsang
gestion to reinstall mod_perl today and see if that will fixes the problem. Many thanks. Tor. On Tue, 20 Jul 2004 11:53:27 -0400, Perrin Harkins <[EMAIL PROTECTED]> wrote: > On Tue, 2004-07-20 at 06:19, Victor Tsang wrote: > > Can't locate auto/Cache/Mmap/_lock.al in @INC &g

debuging run away httpd process

2004-10-14 Thread Victor Tsang
Hello everyone, This could be a bit off topic, please kindly forgive me if it is so, I am seeking for tips on debugging perl script that is running under mod_perl. We use mod_perl heavily here, and lately I notice some apache children for some reason chew up large amount of cpu (indeed all cp

Can't install libapreq2 on Fedora 2

2005-11-04 Thread Victor Dias
I need to install Mason on Fedora 2 with Apache 2. When I try to install Mason i receive: * ERROR: Prerequisite Apache::Request isn't installed I need to install the Apache2::Request (libapreq2) module for Apache 2, and when I try to install it: build/version_check.pl failed: no version_string

Re: Can't install libapreq2 on Fedora 2

2005-11-04 Thread Victor Dias
Erro 1 How can I install Mason without the Apache::Request dependency? I want to try the CGI mode now. The recomendation is to use CGI mode or modperl? What is better? Any help? 2005/11/4, Perrin Harkins <[EMAIL PROTECTED]>: > On Fri, 2005-11-04 at 13:50 -0200, Victor Dias wrote: >

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

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

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

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-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 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 $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 $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'

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: 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

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
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

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: 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 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 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