cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-20 Thread dougm
dougm 02/05/20 15:27:30 Modified:lib/Apache Build.pm Log: use Apache::TestConfig::which instead of duplicating Revision ChangesPath 1.85 +2 -7 modperl-2.0/lib/Apache/Build.pm Index: Build.pm

cvs commit: modperl-2.0/xs/Apache/RequestRec Apache__RequestRec.h

2002-05-20 Thread dougm
dougm 02/05/20 17:07:01 Modified:xs/Apache/RequestRec Apache__RequestRec.h Log: include string terminator when calling ap_set_content_type Revision ChangesPath 1.2 +1 -1 modperl-2.0/xs/Apache/RequestRec/Apache__RequestRec.h Index: Apache__RequestRec.h

cvs commit: modperl-2.0/t/response/TestModperl subenv.pm

2002-05-20 Thread dougm
dougm 02/05/20 19:50:39 Added: t/response/TestModperl subenv.pm Log: tests for $r-subprocess_env Revision ChangesPath 1.1 modperl-2.0/t/response/TestModperl/subenv.pm Index: subenv.pm

Apache::DBI debugging (was: Re: Modifying @INC via startup.pl)

2002-05-20 Thread Per Einar Ellefsen
At 23:36 19.05.2002, Gregory Matthews wrote: # Initialize the database connections for each child Apache::DBI-connect_on_init (DBI:mysql:database=test;host=localhost, user,password, { PrintError = 1, # warn() on errors RaiseError = 0, # don't die on error AutoCommit = 1, # commit executes

Re: Memory Leaks

2002-05-20 Thread F . Xavier Noria
On Sun, 19 May 2002 23:34:24 -0400 Perrin Harkins [EMAIL PROTECTED] wrote: : Leaks are caused by circular references, the string form of eval (at : least it used to leak a little), nested closures (sometimes created : accidentally with the Error module) I am using the Error module in my current

Re: Scripts and passwd

2002-05-20 Thread Thomas Klausner
Hi! On Sun, May 19, 2002 at 10:34:17AM +0200, Per Einar Ellefsen wrote: At 10:22 19.05.2002, [EMAIL PROTECTED] wrote: I have written scripts to add a user to the passwd and shadow files as well as sendmail user files. When I run this script from the command line for testing all runs and

Re: Memory Leaks

2002-05-20 Thread Matt Sergeant
On Mon, 20 May 2002, F. Xavier Noria wrote: On Sun, 19 May 2002 23:34:24 -0400 Perrin Harkins [EMAIL PROTECTED] wrote: : Leaks are caused by circular references, the string form of eval (at : least it used to leak a little), nested closures (sometimes created : accidentally with the Error

Re: Memory Leaks

2002-05-20 Thread F . Xavier Noria
On Mon, 20 May 2002 10:15:02 +0100 (BST) Matt Sergeant [EMAIL PROTECTED] wrote: : my $um = UserManager-new; : # ... : try { : $um-write_user($user); : $um-dbh-commit; : } catch Exception::DB with { : my $e = shift; : debug Exception: $e; :

Re: Setting require in Authentication handler?

2002-05-20 Thread Geoffrey Young
Todd Chapman wrote: Can dir_config be used to set 'require' in an authentication handler? no. dir_config() provides access to a mod_perl specific table of variables, not generic Apache configuration directives. there is no API for setting the Require directive - it needs to be in your

Re: building mod_perl_1.99_01,

2002-05-20 Thread Per Einar Ellefsen
At 13:47 20.05.2002, H Jayakumar wrote: Hello anyone, Iam building mod_perl for NetWare. The new mod_perl ( 1.99_01 ) has extensions, under the wrapxs and the xs directories. I have built mod_perl.so .in the src/modules/perl directory. What should I do next , to get the complete mod_perl ?

Re: Memory Leaks

2002-05-20 Thread Matt Sergeant
On Mon, 20 May 2002, F. Xavier Noria wrote: On Mon, 20 May 2002 10:15:02 +0100 (BST) Matt Sergeant [EMAIL PROTECTED] wrote: : my $um = UserManager-new; : # ... : try { : $um-write_user($user); :$um-dbh-commit; : } catch Exception::DB with { :

Re: Memory Leaks

2002-05-20 Thread Mark Fowler
On Mon, 20 May 2002, Matt Sergeant wrote: if ($@ $@-isa('Exception::DB')) { debug Exception: $@; $um-dbh-rollback; } (note: if you expect all exceptions to be references like this, you had better have a $SIG{__DIE__} handler installed to bless non-blessed exceptions before

Re: Reloading Library Files

2002-05-20 Thread Ted Prah
Stas Bekman wrote: Ted Prah wrote: Thanks Drew, I tried that, but it did not work. What happends if you add: PerlWarn On in httpd.conf or start the script with perl -w? any warnings? I had PerlWarn On and added -w anyway, but there were no errors. do you test only this

Re: Memory Leaks

2002-05-20 Thread Matt Sergeant
On Mon, 20 May 2002, Mark Fowler wrote: On Mon, 20 May 2002, Matt Sergeant wrote: if ($ $@-isa('Exception::DB')) { debug Exception: $; $um-dbh-rollback; } (note: if you expect all exceptions to be references like this, you had better have a $SIG{__DIE__} handler installed

Re: Setting require in Authentication handler?

2002-05-20 Thread Geoffrey Young
Todd Chapman wrote: I need to decide who has access based on the URI. I guess this means I can't use Apache's Basic auth module, since I can't dynamically set require. as I was saying, go ahead and set the Require directive on the Location (or whatever) that you want to protect. if a

New mod_perl website [Was Re: Modifying @INC via startup.pl]

2002-05-20 Thread Drew Taylor
This is a little OT, but I really love the new look of the website you mention below. Major kudos to all those who helped put together the new look-n-feel content. Drew At 11:53 PM 5/19/2002 +0200, you wrote: Thank you very much Gregory, I have patches the online docs. By the way, the

Re: Setting require in Authentication handler?

2002-05-20 Thread Geoffrey Young
Todd Chapman wrote: That makes sense. I can't use mod_auth because I can't set Require. well, if you're saying that you don't have the ability to set the Require directive at all (as in you don't have access to edit httpd.conf), then you can't run any authentication handler - mod_auth,

Re: Reloading Library Files

2002-05-20 Thread Stas Bekman
Ted Prah wrote: do you test only this script alone? What happens if you add the package declaration and then call it using the full name? e.g.: Yes, this is the only script (and corresponding library file) that I use for this test. When I use the package declaration and make the call

Re: New mod_perl website [Was Re: Modifying @INC via startup.pl]

2002-05-20 Thread Stas Bekman
Drew Taylor wrote: This is a little OT, but I really love the new look of the website you mention below. Major kudos to all those who helped put together the new look-n-feel content. Thanks Drew, but please hold off on any comments, since we are still tuning the design to work better in

Re: Reloading Library Files

2002-05-20 Thread Ted Prah
Stas Bekman wrote: Ted Prah wrote: do you test only this script alone? What happens if you add the package declaration and then call it using the full name? e.g.: Yes, this is the only script (and corresponding library file) that I use for this test. When I use the package

Re: Reloading Library Files

2002-05-20 Thread Stas Bekman
Ted Prah wrote: That explains the library files not reloading - Thanks! Great! I suppose if you want to use the cheap workaround, you have to s/require/do/. Remember that the guide suggests the lib.pl trick as a workaround, not a solution you go with during the normal development. I

undef Upload object

2002-05-20 Thread Mike Melillo
I am trying to have a user upload an image and I am getting an undef $apr-upload object. Here is the code: form method=post ENCTYPE=multipart/form-data action=/join input type=hidden name=action value=upload br your picture (size limit: 30k)br input type=file name=userpic size=20 p input

Re: undef Upload object

2002-05-20 Thread Geoffrey Young
Mike Melillo wrote: I am trying to have a user upload an image and I am getting an undef $apr-upload object. [snip] sub upload { my ($r) = shift; my $apr = Apache::Request-new($r); my $status = $apr-parse; you might want to check the status of that

Re: undef Upload object

2002-05-20 Thread Stas Bekman
Geoffrey Young wrote: Mike Melillo wrote: I am trying to have a user upload an image and I am getting an undef $apr-upload object. we have a working example that may be able to help you some: http://www.modperlcookbook.org/code/ch03/Cookbook/PrintUploads.pm also see the new

Re: Setting require in Authentication handler?

2002-05-20 Thread Peter Bi
A remark: in many cases, the authentication against the password file can be replaced by verifying valid FTP/Telnet login to localhost, not only because the password (shadow) file is usually not avialble for Apache account but also secure. In the ticketing system, the FTP/Telnet authentication

Re: Memory Leaks

2002-05-20 Thread Gregory Matthews
I too thought of setting a cron job to restart the server once per day in order to keep the memory fresh. In a production environment, are there any downsides to doing this, i.e., server inaccessibility, etc..? Thanks. Gregory At 08:25 AM 5/20/2002 -0400, you wrote: It is more an issue of

Re: Memory Leaks

2002-05-20 Thread Perrin Harkins
Gregory Matthews wrote: I too thought of setting a cron job to restart the server once per day in order to keep the memory fresh. In a production environment, are there any downsides to doing this, i.e., server inaccessibility, etc..? There have been some discussion on the list about

Monitoring the processes

2002-05-20 Thread Gregory Matthews
Thanks to everyone for the great input on Memory Leaks. Now that I have a good starting point for tracking down the problem, when I TEST for leaks, or simply check for a continued increase in server memory usage, how do I go about monitoring the processes growth? For example, is there a

Re: [modperl2] Note on the win32 docs

2002-05-20 Thread Peter Rothermel
I've run into a problem with mod_perl configuration instructions with for Registry scripts. I've built mod_perl and copied the blib directly under my Apache2 (server root) directory. Here's the errors I get run I start apache: C:\WGTI\Apache2\binapache Using C:\WGTI\Apache2/blib [Mon

Re: Monitoring the processes

2002-05-20 Thread Per Einar Ellefsen
At 22:50 20.05.2002, Gregory Matthews wrote: Thanks to everyone for the great input on Memory Leaks. Now that I have a good starting point for tracking down the problem, when I TEST for leaks, or simply check for a continued increase in server memory usage, how do I go about monitoring the

Re: Memory Leaks

2002-05-20 Thread Gregory Matthews
Unfortunately, we only have one machine. If we did employ the cron job as a clean-up utility once per day, wouldn't the potential impact of a site being unavailable only be for a few seconds (until Apache restarted)? Gregory At 05:12 PM 5/20/2002 -0400, you wrote: Like another suggestion,

Re: problems on OS X

2002-05-20 Thread Doug MacEachern
On Sun, 28 Apr 2002, Ken Williams wrote: Insecure dependency in eval while running with -T switch. Callback called exit. this has been fixed in modperl cvs, just remove the 'use ExtUtils::testlib;' line in t/docs/startup.pl

Re: Memory Leaks

2002-05-20 Thread Per Einar Ellefsen
At 23:23 20.05.2002, Gregory Matthews wrote: Unfortunately, we only have one machine. If we did employ the cron job as a clean-up utility once per day, wouldn't the potential impact of a site being unavailable only be for a few seconds (until Apache restarted)? And if something goes wrong?

Re: Memory Leaks

2002-05-20 Thread Jason
If you don't want to restart the server then don't do this instead, it should help prevent small leaks from being a problem. http://httpd.apache.org/docs-2.0/mod/mpm_common.html#maxrequestsperchild - Original Message - From: Per Einar Ellefsen [EMAIL PROTECTED] To: Gregory

Re: Memory Leaks

2002-05-20 Thread Matt Sergeant
On Monday 20 May 2002 9:30 pm, Gregory Matthews wrote: I too thought of setting a cron job to restart the server once per day in order to keep the memory fresh. In a production environment, are there any downsides to doing this, i.e., server inaccessibility, etc..? It's very rare to have a

Re: Memory Leaks

2002-05-20 Thread Allen Day
I've noticed that if I restart apache while I'm in the middle of a download (MP3 stream), after the buffer in my MP3 player runs out, it skips to the next track -- presumably because the connection was closed. This might cause a problem for you if your users are downloading big files. They

Re: Memory Leaks

2002-05-20 Thread Perrin Harkins
Per Einar Ellefsen wrote: And if something goes wrong? You'd be having a server offline with noone knowing about it. You can easilly set up mon (http://www.kernel.org/software/mon/) to page you if the server doesn't come back up within a certain amount of time. - Perrin

Re: Memory Leaks

2002-05-20 Thread Per Einar Ellefsen
At 23:54 20.05.2002, Allen Day wrote: I've noticed that if I restart apache while I'm in the middle of a download (MP3 stream), after the buffer in my MP3 player runs out, it skips to the next track -- presumably because the connection was closed. This might cause a problem for you if your users

Re: Memory Leaks

2002-05-20 Thread Perrin Harkins
Jason wrote: If you don't want to restart the server then don't do this instead, it should help prevent small leaks from being a problem. http://httpd.apache.org/docs-2.0/mod/mpm_common.html#maxrequestsperchild Apache::SizeLimit or Apache::GTopLimit is a better way to do it, since it

Re: Monitoring the processes

2002-05-20 Thread Perrin Harkins
Gregory Matthews wrote: For example, is there a command line tool to use that will allow me to see the process growth upon request reload? I know that I should run the server with httpd -X, but I don't know how to actually see the memory being used/increased/decreased when the prog is

Re: Memory Leaks

2002-05-20 Thread Allen Day
I mentioned the connection closing as a drawback of restarting the server -- it was slightly OT for the thread. Yes, it is a subclass of Apache::MP3 that can stream video and audio. There is an old version called Apache::Jukebox in the Apache::MP3 CVS at namp.sourceforge.net in case anyone is

Re: Memory Leaks

2002-05-20 Thread Doug MacEachern
On Mon, 20 May 2002, Perrin Harkins wrote: Apache::SizeLimit or Apache::GTopLimit is a better way to do it, since it results in fewer unnecessary restarts. However, it's still a good idea to restart periodically, because some of the shared memory seems to become unshared over time no

Re: How to configure mod_perl to get Connection.so, Connection.bsand so on...

2002-05-20 Thread Doug MacEachern
On Sat, 27 Apr 2002, sagar wrote: Hi I have installed apache-1.3.12, openssl-0.9.5a and apache-1.3.12+ssl- 1.40 and configured mod_perl-1.26 on freeBSD 4.1 with apache by giving the following: %perl Makefile.PL APACHE_SRC=../apache_1.3.12/src DO_HTTPD=1 USE_APACI=1 EVERYTHING=1

Re: [modperl2] Note on the win32 docs

2002-05-20 Thread Doug MacEachern
On Mon, 20 May 2002, Peter Rothermel wrote: I've run into a problem with mod_perl configuration instructions with for Registry scripts. I've built mod_perl and copied the blib directly under my Apache2 (server root) directory. sounds like a bug that has been fixed in cvs. try the cvs

Re: [modperl2] Note on the win32 docs

2002-05-20 Thread Peter Rothermel
Thanks for the info. Latest from cvs works fine. Any idea how close _02 might be to release? -pete Doug MacEachern wrote: On Mon, 20 May 2002, Peter Rothermel wrote: I've run into a problem with mod_perl configuration instructions with for Registry scripts. I've built mod_perl

Re: Memory Leaks

2002-05-20 Thread Issac Goldstand
I'd like to try to disagree here. I have built several file-related webapps where I have implemented virtual filesystems which require special perl modules to access the files at all. mod_perl takes care of serving the requests. If I need a restart, then I can still safely use graceful.

Re: Memory Leaks

2002-05-20 Thread Per Einar Ellefsen
At 00:45 21.05.2002, Issac Goldstand wrote: I'd like to try to disagree here. I have built several file-related webapps where I have implemented virtual filesystems which require special perl modules to access the files at all. mod_perl takes care of serving the requests. If I need a

Re: Help with Method Handlers in mod_perl 1.99

2002-05-20 Thread Doug MacEachern
On Fri, 3 May 2002, Peter Rothermel wrote: I tried the mehod attribute and now I get this error: Error message: Can't locate object method via package Apache::AuthDerivedHandler. method handlers were broken in _01, this has been fixed in cvs and will be in 1.99_02

RE: mod_perl2: nmake test crashes apache

2002-05-20 Thread Doug MacEachern
On Tue, 14 May 2002, Alessandro Forghieri wrote: ii) It does however crash on my testbed app (which runs as standard CGI, FastCGI and moperl1). The crash itself appears to happen when a number of nearly-simultaneous requests arrive to the server and is fatal to modperl (but the

Re: make test problem

2002-05-20 Thread Doug MacEachern
On Mon, 20 May 2002, Jie Gao wrote: Just got one from cvs and 'make test' hangs on apr/util: ... apr/util likely the call to APR::generate_random_bytes, could be blocking on /dev/random or similar (strace would tell you). i've disabled the test in cvs for the moment, as i've

Re: Seg fault on apache start

2002-05-20 Thread Doug MacEachern
On Sat, 18 May 2002, Jaberwocky wrote: I'm having some problems with this. Apache seg faults on the call to parse... .. #1 0x80c5ad8 in XML_GetBuffer () did you build apache with --disable-rule=EXPAT ?

Re: problems on OS X

2002-05-20 Thread Ken Williams
Great, the CVS version passes all tests for me now when built under 'perl Makefile.PL EVERYTHING=1' using apache 1.3.24. On Tuesday, May 21, 2002, at 07:19 AM, Doug MacEachern wrote: On Sun, 28 Apr 2002, Ken Williams wrote: Insecure dependency in eval while running with -T

Apache::GTopLimit

2002-05-20 Thread Gregory Matthews
Does using the Apache::GTopLimit module have the same net effect as restarting the server itself by simply killing off the actual processes which are growing beyond the set threshold, and thereby causing new processes to be born? If so, this sounds like a good alternative to setting a cron

Re: [modperl2] Note on the win32 docs

2002-05-20 Thread Doug MacEachern
On Mon, 20 May 2002, Peter Rothermel wrote: Thanks for the info. Latest from cvs works fine. Any idea how close _02 might be to release? hopefully in a day or three.

Re: Apache::GTopLimit

2002-05-20 Thread Perrin Harkins
Does using the Apache::GTopLimit module have the same net effect as restarting the server itself by simply killing off the actual processes which are growing beyond the set threshold, and thereby causing new processes to be born? It does kill off processes that are getting too big, and you

Re: Apache::GTopLimit

2002-05-20 Thread Gregory Matthews
So to modify my previous question, other than the loss of some shared memory over time, GTopLimit will have the same effect as restarting the server? On a side note, how are you tracking/discovering the this minimal loss over time? Gregory At 08:38 PM 5/20/2002 -0400, you wrote: Does

Re: mod_perl 2.0 - writing a proxy handler

2002-05-20 Thread Doug MacEachern
On Tue, 14 May 2002, Douglas Younger wrote: Hello, Has anyone written a proxy handler in 2.0 similar to example 7-12 of the O`Reilly book? I've tried converting it without much luck. I don't need the add-blocker stuff, just a generic proxy handle that I can add some additional lines

Re: Apache::GTopLimit

2002-05-20 Thread Perrin Harkins
So to modify my previous question, other than the loss of some shared memory over time, GTopLimit will have the same effect as restarting the server? Yes. That shared memory is important though. On a side note, how are you tracking/discovering the this minimal loss over time?

Re: compatibility problem

2002-05-20 Thread Doug MacEachern
On Fri, 17 May 2002, Jie Gao wrote: use Apache::Constants qw(:common :response M_GET M_POST AUTH_REQUIRED REDIRECT); the :response group in 1.x consists of names which apache has deprecated in 1.3.x and removed in 2.0, for which there are HTTP_* names that replace the old names. so for

Re: Memory Leaks

2002-05-20 Thread Stas Bekman
Per Einar Ellefsen wrote: At 23:54 20.05.2002, Allen Day wrote: I've noticed that if I restart apache while I'm in the middle of a download (MP3 stream), after the buffer in my MP3 player runs out, it skips to the next track -- presumably because the connection was closed. This might

Re: Memory Leaks

2002-05-20 Thread Stas Bekman
Gregory Matthews wrote: Does using the Apache::GTopLimit module have the same net effect as restarting the server itself by simply killing off the actual processes which are growing beyond the set threshold, and thereby causing new processes to be born? It's not the exactly the same,

Re: Monitoring the processes

2002-05-20 Thread Stas Bekman
Gregory Matthews wrote: Thanks to everyone for the great input on Memory Leaks. Now that I have a good starting point for tracking down the problem, when I TEST for leaks, or simply check for a continued increase in server memory usage, how do I go about monitoring the processes growth?

Re: Apache::GTopLimit

2002-05-20 Thread Stas Bekman
Perrin Harkins wrote: Does using the Apache::GTopLimit module have the same net effect as restarting the server itself by simply killing off the actual processes which are growing beyond the set threshold, and thereby causing new processes to be born? It does kill off processes that are

Re: Monitoring the processes

2002-05-20 Thread Gregory Matthews
Sorry for being lazy! I will read the guide all the way through...promise! Thanks though for everyone's help up to this point! Gregory At 12:04 PM 5/21/2002 +0800, you wrote: Gregory Matthews wrote: Thanks to everyone for the great input on Memory Leaks. Now that I have a good starting point