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
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.
Ben Cohen writes:
Go to the line that reads:
eval { {$cv}($r, @_) } if $r-seqno;
I love perl :)
Dirk
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}...
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
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
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
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
-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,
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
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
-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
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
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
-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
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
"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
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
"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
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
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
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
-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:
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.
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
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.
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
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
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
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
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
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
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
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
-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
-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;
-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
"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,
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
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
-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,
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
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,
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 . | _| |
\||
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
59 matches
Mail list logo