Re: Memory usage for libareq uploads

2000-06-06 Thread Jie Gao
On Tue, 6 Jun 2000, Jeremy Howard wrote: ... Well, I'm facing this problem now. The parms() method (or parse() or anything else that calls parms()) chews up enormous amounts of memory when uploading large files. I like to give my webmail users freedom to upload pretty much whatever size

RE: DSO mod_perl and preloading

2000-06-06 Thread Gerald Richter
All these tips and benchmarks on optimising mod_perl by preloading used modules/DBD-drivers etc. are great. However, I have seen warnings about preloading modules if mod_perl is loaded as a DSO. (e.g for HTML::Embperl). Does this still apply? My setup is redhat6.2/perl-5.6/mod_perl-1.23.

Re: Solution for: Re: $ENV{PATH} set by mod_perl script affects mod_cgi scripts

2000-06-06 Thread Dirk Lutzebaeck
Ben Cohen writes: Go to the line that reads: eval { {$cv}($r, @_) } if $r-seqno; I love perl :) Dirk

Re: Solution for: Re: $ENV{PATH} set by mod_perl script affectsmod_cgi scripts

2000-06-06 Thread Matt Sergeant
On Tue, 6 Jun 2000, Ben Cohen wrote: Thanks to all for the helpful suggestions. Gunther Birzniek from the list suggested a solution that I've now tried and it works perfectly: {begin quote} I assume you are running with Apache:Registry? You could also save off the $ENV{PATH}...

Re: Memory usage for libareq uploads

2000-06-06 Thread Jeremy Howard
Jie Gao said (talking about avoiding memory problems with libareq::parms()): What I do is kill the child process after uploading is finished: $r-child_terminate(); Not an elegant way, but it works for the time being. Good idea. I've implemented something which uses this approach if the

Re: Memory usage for libareq uploads

2000-06-06 Thread Stas Bekman
On Tue, 6 Jun 2000, Jeremy Howard wrote: Jie Gao said (talking about avoiding memory problems with libareq::parms()): What I do is kill the child process after uploading is finished: $r-child_terminate(); Not an elegant way, but it works for the time being. Good idea. I've

Installing mod_perl Apache as non root user...

2000-06-06 Thread Flemming Mahler Larsen
Hi! I've been trying to install mod_perl (1.24) and Apache (1.3.12) on a Sun E450 (sparc-sun-solaris2.5.1), using a "configuration command" looking like this (one long line): perl Makefile.PL PREFIX=/home/tdi/perl USE_APACI=1 PERL_CHILD_INIT=1 \ PERL_AUTHEN=1 PERL_AUTHENZ=1 PERL_AUTHZ=1

Re: Installing mod_perl Apache as non root user...

2000-06-06 Thread Stas Bekman
On Tue, 6 Jun 2000, Flemming Mahler Larsen wrote: Hi! I've been trying to install mod_perl (1.24) and Apache (1.3.12) on a Sun E450 (sparc-sun-solaris2.5.1), using a "configuration command" looking like this (one long line): perl Makefile.PL PREFIX=/home/tdi/perl USE_APACI=1

RE: Apache::Dispatch

2000-06-06 Thread Geoffrey Young
-Original Message- From: Ken Williams [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 06, 2000 12:38 AM To: Christopher Lee Cc: [EMAIL PROTECTED] Subject: Re: Apache::Dispatch [EMAIL PROTECTED] (Christopher Lee) wrote: There's a real live working example if anybody wants it,

Segment fault in Perl_pp_leavetry

2000-06-06 Thread Mike McLagan
Hello, I am having the above segfault using mod_perl 1.23 and mod_perl 1.24 on a RedHat 6.2 system with Perl 5.00503. The Apache daemon was compiled with max DSO and included the mod_ssl patches, etc as shown below. mod_perl is compiled with -DEAPI per it's request. If I operate without

$r-register_cleanup limits?

2000-06-06 Thread Jim Woodgate
In a module I'm using register_cleanup so the client doesn't need to wait for me to do a bunch of work. It basically does this: foreach (@images) { unless (-f $thumb{$_}) { create_thumb($_); $r-register_cleanup(sub {create_more_sizes($_, ...)}); } } create_more_sizes will create

RE: $r-register_cleanup limits?

2000-06-06 Thread Geoffrey Young
-Original Message- From: Jim Woodgate [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 06, 2000 9:48 AM To: [EMAIL PROTECTED] Subject: $r-register_cleanup limits? In a module I'm using register_cleanup so the client doesn't need to wait for me to do a bunch of work. It

Re: [benchmark] DBI/preload (was Re: [RFC] improving memory mapping thru code exercising)

2000-06-06 Thread Jason Terry
I just wanted to thank you guys for sending this to the mailing list. I added these lines to my startup script use Carp; CGI-compile(qw(my_common_functions)); DBI-install_driver('mysql'); Please note that these were already existing in my startup script. use CGI(); use DBI(); And after

NEWBIE: appending to page content

2000-06-06 Thread Jim Sproull
I'm relatively new to mod_perl and have been fighting with a relatively simple task: appending data to all text/html pages. So, for instance, I want something like this returned to the client: HTML BODY /BODY /HTML EXTRA SPECIAL MESSAGE - I've been

RE: NEWBIE: appending to page content

2000-06-06 Thread Geoffrey Young
-Original Message- From: Jim Sproull [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 06, 2000 11:00 AM To: [EMAIL PROTECTED] Subject: NEWBIE: appending to page content I'm relatively new to mod_perl and have been fighting with a relatively simple task: appending data to all

RE: Apache::Dispatch

2000-06-06 Thread Stas Bekman
On Tue, 6 Jun 2000, Geoffrey Young wrote: In general, when accepting arbitrary user input you want to make sure there are only a very few access points to the code, then make sure you have very tight validation of the data in those access points. Taint mode comes to mind as one tool

RE: Apache::Dispatch

2000-06-06 Thread Vivek Khera
"SB" == Stas Bekman [EMAIL PROTECTED] writes: SB I know some people believe that they can get away without this mode, SB that's why it'd be the best if it'd be a variable and not a static value, SB so those who don't want it will be able to turn it off. But in all modules SB that deal with

RE: [benchmark] DBI/preload (was Re: [RFC] improving memory mapping thru code exercising)

2000-06-06 Thread Ken Miller
At 11:10 AM 6/6/00 -0400, Geoffrey Young wrote: -Original Message- From: Jason Terry [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 06, 2000 10:52 AM To: [EMAIL PROTECTED] Subject: Re: [benchmark] DBI/preload (was Re: [RFC] improving memory mapping thru code exercising) I

RE: Apache::Dispatch

2000-06-06 Thread Stas Bekman
"SB" == Stas Bekman [EMAIL PROTECTED] writes: SB I know some people believe that they can get away without this mode, SB that's why it'd be the best if it'd be a variable and not a static value, SB so those who don't want it will be able to turn it off. But in all modules SB that deal

Data structure question

2000-06-06 Thread Drew Taylor
Hello, This doesn't directly relate to mod_perl, but I'd like to make this as memory efficient as possible since it runs under mod_perl. :-) I have a question about data structures. Currently, I am doing SQL queries and returning an array ref and a hash ref. The array is to preserve order, and

Re: Data structure question

2000-06-06 Thread Ken Y. Clark
On Tue, 6 Jun 2000, Drew Taylor wrote: I have a question about data structures. Currently, I am doing SQL queries and returning an array ref and a hash ref. The array is to preserve order, and the hash contains various bits of data about that not to be dense, but can't you just issue an

Re: Data structure question

2000-06-06 Thread Gunther Birznieks
Using tied hashes, you could conceivably make your own ordered hash class and use that as the data structure you return. You'd still basically have two data structures (for performance) but the fact that it is two data structures would be hidden behind the tied hash which would be programmed

RE: [benchmark] DBI/preload (was Re: [RFC] improving memory mapping thru code exercising)

2000-06-06 Thread Geoffrey Young
-Original Message- From: Ken Miller [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 06, 2000 12:13 PM To: [EMAIL PROTECTED] Subject: RE: [benchmark] DBI/preload (was Re: [RFC] improving memory mapping thru code exercising) At 11:10 AM 6/6/00 -0400, Geoffrey Young wrote:

RE: Apache::Dispatch

2000-06-06 Thread Tom Mornini
This thread caught my eye, because I recently wrote a module called Dispatch.pm. It works like this: PerlTransHandler - catch calls, set $r-pnotes, return DECLINED This could potentially be skipped, except for other session managment stuff up here.

Re: Data structure question

2000-06-06 Thread Eric Cholet
Using tied hashes, you could conceivably make your own ordered hash class and use that as the data structure you return. You'd still basically have two data structures (for performance) but the fact that it is two data structures would be hidden behind the tied hash which would be programmed

Vulnerability awareness (was: Re: FW: Apache::Dispatch)

2000-06-06 Thread Stas Bekman
Folks let me stress a little point (or a big, depending on how you look at this), I'm in no way try to discourage Geoff for creating yet another cool module. It's just that lately I read too much info about sites being hacked thru bugs in CGI code. Here is a must read, if you didn't read it yet.

Re: Data structure question

2000-06-06 Thread Ken Miller
At 12:39 PM 6/6/00 -0400, Drew Taylor wrote: Hello, This doesn't directly relate to mod_perl, but I'd like to make this as memory efficient as possible since it runs under mod_perl. :-) I have a question about data structures. Currently, I am doing SQL queries and returning an array ref and a

Re: Data structure question

2000-06-06 Thread Stas Bekman
On Tue, 6 Jun 2000, Eric Cholet wrote: Using tied hashes, you could conceivably make your own ordered hash class and use that as the data structure you return. You'd still basically have two data structures (for performance) but the fact that it is two data structures would be hidden

Apache hanging when it reaches limit of process limit

2000-06-06 Thread Tom Lancaster
Hi, I've got this strange behavior in a production site that until a recent upgrade never showed this kind of thing: I've set maxclients to 50, maxrequestsperchild 1. What happens is that the server runs fine, is fast, etc, but the number of apache processes climbs gradually until it reaches

Re: Apache hanging when it reaches limit of process limit

2000-06-06 Thread Stas Bekman
On Tue, 6 Jun 2000, Tom Lancaster wrote: Hi, I've got this strange behavior in a production site that until a recent upgrade never showed this kind of thing: I've set maxclients to 50, maxrequestsperchild 1. What happens is that the server runs fine, is fast, etc, but the number of apache

Re: Apache hanging when it reaches limit of process limit

2000-06-06 Thread Tom Lancaster
Here's the output of gdb: ( now what does this mean?) Starting program: /usr/sbin/apache -X (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging

Re: Apache hanging when it reaches limit of process limit

2000-06-06 Thread Stas Bekman
On Tue, 6 Jun 2000, Tom Lancaster wrote: Here's the output of gdb: ( now what does this mean?) You should compile mod_perl with PERL_DEBUG=1, see the SUPPORT file. Starting program: /usr/sbin/apache -X (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols

RE: NEWBIE: appending to page content

2000-06-06 Thread Jim Sproull
Thanks to Geoff Young for pointing me in the right direction towards Apache::SimpleReplace. I have made my own stripped down version of this, but still need guidance (Geoff, you're welcome to reply again if you can help ;) Since I only want all text/html pages to be appended to, I want all

Re: Apache dumping core in mod_perl's 'make test'

2000-06-06 Thread Stas Bekman
Please! Keep the questions on the list!!! thank you! Thought the aforementioned procedure might be useful explaining my current trouble. Perl 5.5.3, Apache 1.3.12, mod_perl 1.24 -- no other add-ons to Apache... OS is Linux (kernel 2.2.10). Any hints? I think I've seen this behavior when

RE: NEWBIE: appending to page content

2000-06-06 Thread Geoffrey Young
-Original Message- From: Jim Sproull [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 06, 2000 1:53 PM To: [EMAIL PROTECTED] Subject: RE: NEWBIE: appending to page content Thanks to Geoff Young for pointing me in the right direction towards Apache::SimpleReplace. I have

RE: NEWBIE: appending to page content

2000-06-06 Thread Jim Sproull
-Original Message- From: Geoffrey Young [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 06, 2000 2:03 PM To: 'Jim Sproull'; [EMAIL PROTECTED] Subject: RE: NEWBIE: appending to page content sub handler { my $r = shift; $log = $r-server-log;

RE: NEWBIE: appending to page content

2000-06-06 Thread Geoffrey Young
-Original Message- From: Jim Sproull [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 06, 2000 2:09 PM To: Geoffrey Young Cc: [EMAIL PROTECTED] Subject: RE: NEWBIE: appending to page content [snip] Hi again Geoff. Thanks for the quick answer. I actually tried adding

Re: Data structure question

2000-06-06 Thread Drew Taylor
"Ken Y. Clark" wrote: On Tue, 6 Jun 2000, Drew Taylor wrote: I have a question about data structures. Currently, I am doing SQL queries and returning an array ref and a hash ref. The array is to preserve order, and the hash contains various bits of data about that not to be dense,

Re: Data structure question

2000-06-06 Thread Drew Taylor
Gunther Birznieks wrote: Using tied hashes, you could conceivably make your own ordered hash class and use that as the data structure you return. You'd still basically have two data structures (for performance) but the fact that it is two data structures would be hidden behind the tied hash

Re: Data structure question

2000-06-06 Thread Drew Taylor
Eric Cholet wrote: Using tied hashes, you could conceivably make your own ordered hash class and use that as the data structure you return. You'd still basically have two data structures (for performance) but the fact that it is two data structures would be hidden behind the tied hash

RE: NEWBIE: appending to page content

2000-06-06 Thread Geoffrey Young
-Original Message- From: Jim Sproull [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 06, 2000 2:35 PM To: Geoffrey Young Subject: RE: NEWBIE: appending to page content -Original Message- From: Geoffrey Young [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 06,

Re: Data structure question

2000-06-06 Thread Nick Tonkin
On Tue, 6 Jun 2000, Drew Taylor wrote: "Ken Y. Clark" wrote: On Tue, 6 Jun 2000, Drew Taylor wrote: I have a question about data structures. Currently, I am doing SQL queries and returning an array ref and a hash ref. The array is to preserve order, and the hash contains

Re: Data structure question

2000-06-06 Thread Drew Taylor
Ken Miller wrote: Well, if the keys are unique, you could just return a hashref, and then access it using sorted keys: foreach( sort keys %$HR ) { ## insert useful stuff here } If only I could just use sort. :-) The order could be completely arbitrary, based on search parameters,

RE: Data structure question

2000-06-06 Thread Jerrad Pierce
you can use sort, of the values are hashes or indexes: foreach ( sort { $a-{name} cmp $b-{name} keys %hash ) or foreach ( sort { $a-[0] cmp $b-[0] keys %hash ) o _ /|/ | Jerrad Pierce \ | __|_ _| /||/ http://pthbb.org . | _| | \||

Re: Data structure question

2000-06-06 Thread Drew Taylor
Stas Bekman wrote: and in perl5.6 it's called pseudohash (well it was known before but is supported in 5.6) http://www.perl.com/pub/doc/manual/html/pod/perldelta.html#Pseudo_hashes_are_supported I know about pseudohashes - thanks to Damien again! :-). They look very cool, but to be honest

Re: Data structure question

2000-06-06 Thread Drew Taylor
Jerrad Pierce wrote: you can use sort, of the values are hashes or indexes: foreach ( sort { $a-{name} cmp $b-{name} keys %hash ) or foreach ( sort { $a-[0] cmp $b-[0] keys %hash ) In this case I can't use sort since the order is completely arbitrary, based on the SQL issued. Hence the

RE:Vulnerability awareness

2000-06-06 Thread ___cliff rayman___
here is something posted to p5p today. looks like a good place to start Stas's challenge. Benjamin Elijah Griffin wrote: In alt.hackers a while ago I saw this .sig: #!/usr/bin/perl $j=\$j;{$_=unpack(P25,pack(L,$j));/Just Another Perl Wannabe/?print:$j++redo} It occured to me after the

Re: Apache hanging when it reaches limit of process limit

2000-06-06 Thread Tom Lancaster
OK, I followed the directions in SUPPORT, for gdb, and got this : (gdb) run -X -f /usr/local/apache/conf/httpd.conf.test Starting program: /usr/local/mod_perl-1.24/../apache_1.3.12/src/httpd -X -f /usr/local/apache/conf/httpd.conf.test Subroutine Apache::TIEHANDLE redefined at

Re: Data structure question

2000-06-06 Thread Perrin Harkins
On Tue, 6 Jun 2000, Drew Taylor wrote: I know about tied hashes - Thanks Damien for your excellent book! - but there is a performance penalty. How big is this penalty? Is it worth using tied hashes? Versus an array of hash refs? They're a lot slower than normal data structures, or even normal

Re: Apache dumping core in mod_perl's 'make test'

2000-06-06 Thread Rob Fugina
On Tue, Jun 06, 2000 at 08:54:38PM +0300, Stas Bekman wrote: Please! Keep the questions on the list!!! thank you! Sorry about that -- I was in a hurry at the time and didn't notice how my mailer chose to reply... Thought the aforementioned procedure might be useful explaining my current

Re: Data structure question

2000-06-06 Thread Stas Bekman
On Tue, 6 Jun 2000, Perrin Harkins wrote: On Tue, 6 Jun 2000, Drew Taylor wrote: I know about tied hashes - Thanks Damien for your excellent book! - but there is a performance penalty. How big is this penalty? Is it worth using tied hashes? Versus an array of hash refs? They're a lot

Re: Data structure question

2000-06-06 Thread darren chamberlain
Hi Drew, How about writing a custom sort routine, based on the order you would be using in the array, and returning that as a code ref? Sorting the hash would be as simple as: Common.pm: sub

Re: Data structure question

2000-06-06 Thread Drew Taylor
darren chamberlain wrote: Hi Drew, How about writing a custom sort routine, based on the order you would be using in the array, and returning that as a code ref? Sorting the hash would be as simple as: In this case, it's overkill: the DB has already put the data together in the order I

Re: Data structure question

2000-06-06 Thread Drew Taylor
Stas Bekman wrote: On Tue, 6 Jun 2000, Perrin Harkins wrote: On Tue, 6 Jun 2000, Drew Taylor wrote: I know about tied hashes - Thanks Damien for your excellent book! - but there is a performance penalty. How big is this penalty? Is it worth using tied hashes? Versus an array of

[performance/benchmark] Choosing MaxClients directive

2000-06-06 Thread Stas Bekman
Here is another benchmark for your enjoyment. Comments are welcome! --- Choosing MaxClients directive It's important to specify this parameter on the basis of the resources your machine has. The CMaxClients directive sets the

Apache::TIEHANDLE?

2000-06-06 Thread Tom Lancaster
Hi, I get this error on startup: Subroutine Apache::TIEHANDLE redefined at /usr/lib/perl5/5.005/i386-linux/mod_perl.pm line 65535. What does this mean? Thanks, Tom

[OT] while you were sleeping (PerlWhirl) / perlconference

2000-06-06 Thread Stas Bekman
I couldn't make not to post this... why there was no mod_perl track on the PerlWhirl Cruise :( We could provide such a nice coverage... If you didn't know most of the top Perl developers (including Larry of course) or just plain Perl folks with some spare $3,000+ spent this week cruising around

Strange Segfault with Apache::PerlRun

2000-06-06 Thread Damon Buckwalter
When using Apache::PerlRun to try and run some CGI-ish scripts I noticed a strange phenomenon. If the shebang line in the script contains '-T', that Apache child will segfault on requests to the script. Combinations of '-w', nothing in the shebang line and no shebang line at all work as

Re: Strange Segfault with Apache::PerlRun

2000-06-06 Thread Damon Buckwalter
I forgot to mention also that mod_perl is statically compiled into Apache, and using Perl 5.6.0 -- OpenPGP public key: http://www.meta-x.net/damon/pubkey.asc