RE:Vulnerability awareness

2000-06-07 Thread Stas Bekman
On Tue, 6 Jun 2000, ___cliff rayman___ wrote: 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

RE:Vulnerability awareness

2000-06-07 Thread Gunther Birznieks
At 11:45 AM 6/7/00 +0300, Stas Bekman wrote: On Tue, 6 Jun 2000, ___cliff rayman___ wrote: 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

Re: Vulnerability awareness

2000-06-07 Thread Eric Strovink
Gunther Birznieks wrote: snip From: Jan Dubois [EMAIL PROTECTED] I don't think so. You should never let people execute arbitrary code on your web server anyways. If you do, then the potential intruder can do much more nasty things than just snooping around in memory. -Jan I think Jan is

Big pages and gzip

2000-06-07 Thread Mark Hewis
it would seem to be quite straight forward to implement a handler to gzip all output html files depending on the allowed mime-types and/or user_agent. This would reduce many pages by up to a factor of 10 in size. 1) Is anyone already doing? 2) If not why not? 3) what borwsers would accept html

Re: Big pages and gzip

2000-06-07 Thread Stas Bekman
On Wed, 7 Jun 2000, Mark Hewis wrote: it would seem to be quite straight forward to implement a handler to gzip all output html files depending on the allowed mime-types and/or user_agent. This would reduce many pages by up to a factor of 10 in size. 1) Is anyone already doing? 2) If not

PerlRun benefit from shared modules ?

2000-06-07 Thread David Brown
OK, I'm new to all this, and it's by a sheer miracle that I've compiled Perl 5.6, Apache mod_perl on my BSDI 4.1 box. I may be using completely the wrong terminology, so please bear with me ! I'm running lots of scripts under Apache::PerlRun, migrating the scripts one at a time to run in

Re: PerlRun benefit from shared modules ?

2000-06-07 Thread Gunther Birznieks
Yes you get the benefit of shared modules. PerlRun only differs from registry in the sense that it clears out the namespace of the main script. As for leaking memory like a sieve? That is not unexpected with PerlRun scripts because they are typically not coded cleanly. Hell, even our 6 year

[performance/benchmark] Reducing the Number of stat() Calls Made by Apache

2000-06-07 Thread Stas Bekman
Here is another freshly squeezed^H^H^H^H^H^H^H^Hmade benchmark with comments :) =head2 Reducing the Number of stat() Calls Made by Apache If you watch the system calls that your mod_perl server makes (using Itruss or Istrace depending on your OS), while processing a request, you will notice

Re: PerlRun benefit from shared modules ?

2000-06-07 Thread David Brown
Thanks for the response Gunther, I'll look into running seperate servers. I'm now preloading CGI DBI and memory APPEARS to be gobbled a lot slower now. Which is nice. Does DBI automatically pull in DBD, or should I preload Apache:DBD also ?

Re: PerlRun benefit from shared modules ?

2000-06-07 Thread Stas Bekman
On Wed, 7 Jun 2000, David Brown wrote: Thanks for the response Gunther, I'll look into running seperate servers. I'm now preloading CGI DBI and memory APPEARS to be gobbled a lot slower now. Which is nice. I can see a rain of questions coming :) David, please read the guide and other

Newbie Questions about Perl/Apache

2000-06-07 Thread Rich Lemanski
Hello all, I just joined the list the other day and have some questions about internal and external Perl interpretors for Apache. Forgive my lack of knowledge, but I am assuming that mod_perl is the Perl interpretor that runs internally to Apache and starts when Apache starts. The external

Re: Newbie Questions about Perl/Apache

2000-06-07 Thread Matt Sergeant
On Wed, 7 Jun 2000, Rich Lemanski wrote: Hello all, I just joined the list the other day and have some questions about internal and external Perl interpretors for Apache. Forgive my lack of knowledge, but I am assuming that mod_perl is the Perl interpretor that runs internally to Apache

[performance/benchmark] printing techniques

2000-06-07 Thread Stas Bekman
Following Tim's comments here is the new benchmark. (I'll address the buffering issue in another post) use Benchmark; use Symbol; my $fh = gensym; open $fh, "/dev/null" or die; sub multi_print{ print $fh "!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\""; print $fh "HTML";

Re: [performance/benchmark] printing techniques

2000-06-07 Thread Matt Sergeant
On Wed, 7 Jun 2000, Stas Bekman wrote: Following Tim's comments here is the new benchmark. (I'll address the buffering issue in another post) use Benchmark; use Symbol; my $fh = gensym; open $fh, "/dev/null" or die; sub multi_print{ print $fh "!DOCTYPE HTML PUBLIC

Re: [performance/benchmark] printing techniques

2000-06-07 Thread Stas Bekman
[benchmark code snipped] single_print: 4 wallclock secs ( 2.28 usr + 0.47 sys = 2.75 CPU) here_print:2 wallclock secs ( 2.45 usr + 0.45 sys = 2.90 CPU) list_print:7 wallclock secs ( 7.17 usr + 0.45 sys = 7.62 CPU) multi_print: 23 wallclock secs (17.52 usr + 5.72

Re: [performance/benchmark] printing techniques

2000-06-07 Thread Eric Cholet
So if you want a better performance, you know what technique to use. I think this last line is misleading. The reality is that you're doing 500,000 iterations here. Even for the worst case scenario of multi_print with no buffering you're managing nearly 22,000 outputs a second. Now

Re: [performance/benchmark] printing techniques

2000-06-07 Thread Eric Strovink
Eric Cholet wrote: Of course the slowest stuff should be optimized first... Right. Which means the Guide, if it is not already so doing, ought to rank-order the optimizations in their order of importance, or better, their relative importance. This one, it appears, should be near the bottom

Re: [performance/benchmark] printing techniques

2000-06-07 Thread Matt Sergeant
On Wed, 7 Jun 2000, Eric Cholet wrote: So if you want a better performance, you know what technique to use. I think this last line is misleading. The reality is that you're doing 500,000 iterations here. Even for the worst case scenario of multi_print with no buffering you're managing

Re: [performance/benchmark] printing techniques

2000-06-07 Thread Eric Cholet
From: "Eric Strovink" [EMAIL PROTECTED] Of course the slowest stuff should be optimized first... Right. Which means the Guide, if it is not already so doing, ought to rank-order the optimizations in their order of importance, or better, their relative importance. This one, it appears,

[Advocacy] apachetoday.com

2000-06-07 Thread Geoffrey Young
apachetoday.com was launched sometime last week (I think), and today features Stas and mod_perl on the front page :) --Geoff

Re: [performance/benchmark] printing techniques

2000-06-07 Thread Matt Sergeant
On Wed, 7 Jun 2000, Eric Cholet wrote: This said, i hurry back to s/"constant strings"/'constant strings'/g; Those two are equal. -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy

Apache::ASP

2000-06-07 Thread Clement Law
How do I make it so when it sees the extension .asp it does the asp thing? instead of putting this Location /asp/ SetHandler perl-script PerlHandler Apache::ASP PerlSetVar Global /tmp /Location

Re: [Advocacy] apachetoday.com

2000-06-07 Thread ___cliff rayman___
yeah - but why the young guy's picture next to Stas's column. i have him pictured as middle forties, slightly overweight, with grey flecks in his black hair. time for a picture change. Geoffrey Young wrote: apachetoday.com was launched sometime last week (I think), and today features Stas

Re: Apache::ASP

2000-06-07 Thread Joshua Chamas
Clement Law wrote: How do I make it so when it sees the extension .asp it does the asp thing? instead of putting this Location /asp/ SetHandler perl-script PerlHandler Apache::ASP PerlSetVar Global /tmp /Location The .htaccess file which activates the sample files in the distribution's

RE: Apache::ASP

2000-06-07 Thread Geoffrey Young
well, I don't use Apache::ASP, but a quick glance of the README yielded the apropriate instructions you are looking for... :) --Geoff -Original Message- From: Clement Law [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 07, 2000 1:54 PM To: [EMAIL PROTECTED] Subject: Apache::ASP

Re: [Advocacy] apachetoday.com

2000-06-07 Thread Stas Bekman
yeah - but why the young guy's picture next to Stas's column. i have him pictured as middle forties, slightly overweight, with grey flecks in his black hair. time for a picture change. Come'n Cliff, I'm only 26!!! The picture is about 3 years old. I don't have any grey flecks, as of

Re: [performance/benchmark] printing techniques

2000-06-07 Thread Barrie Slaymaker
Eric Cholet wrote: These things add up, so don't you think that whatever can be optimized, should ? Wrong question, IMHO: it's what you optimize for that counts. Several things come to mind that are often more important than performance and often mean not optimizing for performance (these

Re: Apache::ASP in virtual hosts

2000-06-07 Thread Joshua Chamas
"Mercer, Ty" wrote: How would one go about adding the Apache::ASP function to the virtual hosts? I have the defunct ASP setting in my httpd.conf file and it works fine for the default site, but nothing for any of the virtuals. Need more specifics? Any info is better than what I have,

Re: Apache::ASP

2000-06-07 Thread Joshua Chamas
He Ding wrote: [Sun Jun 4 15:15:12 2000] [error] Undefined subroutine Apache::Symbol::undef called at /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 1103. [Sun Jun 4 15:15:12 2000] [error] [asp] [937] [debug] destroying - asp: Apache::ASP=HASH(0x8f6c8e4); Eric He You should not be

Re: [performance/benchmark] printing techniques

2000-06-07 Thread Stas Bekman
I don't understand what you're getting at. Does this mean that something shouldn't be optimized because there's something else in the process that is taking more time? For example I have a database powered site, the slowest part of request processing is fetching data from the database.

Re: [performance/benchmark] printing techniques

2000-06-07 Thread Eric Cholet
These things add up, so don't you think that whatever can be optimized, should ? Wrong question, IMHO: it's what you optimize for that counts. Several things come to mind that are often more important than performance and often mean not optimizing for performance (these are interrelated,

Re: [performance/benchmark] printing techniques

2000-06-07 Thread Stas Bekman
On Wed, 7 Jun 2000, Jeff Norman wrote: Frequently, it's hard to build up an entire output segment without code in-between the different additions to the output. I guess you could call this the "append, append, append... output" technique. I think it would be an interesting addition to

Re: [performance/benchmark] printing techniques

2000-06-07 Thread Jeff Norman
Frequently, it's hard to build up an entire output segment without code in-between the different additions to the output. I guess you could call this the "append, append, append... output" technique. I think it would be an interesting addition to the benchmark: sub gather_print{ my

Re: [performance/benchmark] printing techniques

2000-06-07 Thread ___cliff rayman___
Stas Bekman wrote: Per your request: The handler: query | avtime completed failedrps --- single_print |110 5000 0881 here_print|111 5000 0881 list_print|111 5000 0

Re: [performance/benchmark] printing techniques

2000-06-07 Thread Perrin Harkins
On Wed, 7 Jun 2000, Stas Bekman wrote: And the results are: single_print: 1 wallclock secs ( 1.74 usr + 0.05 sys = 1.79 CPU) here_print:3 wallclock secs ( 1.79 usr + 0.07 sys = 1.86 CPU) list_print:7 wallclock secs ( 6.57 usr + 0.01 sys = 6.58 CPU) multi_print: 10

[performance posts] disclaimer

2000-06-07 Thread Stas Bekman
Folks, all the benchmarks and conclusions that I post are not coming as a bite flame. Let me summarize it in two words: I want people to be able to optimize their code when they want to. I just show how to do it and what are the good places to look at. If you don't want/need to optimize,

Re: [performance/benchmark] printing techniques

2000-06-07 Thread Stas Bekman
On Wed, 7 Jun 2000, ___cliff rayman___ wrote: Stas Bekman wrote: Per your request: The handler: query | avtime completed failedrps --- single_print |110 5000 0881 here_print|111

ApacheCon 2000 Europe: Call for Participation (fwd)

2000-06-07 Thread Stas Bekman
FYI -- Forwarded message -- Date: Wed, 07 Jun 2000 15:24:42 -0400 From: Rodent of Unusual Size [EMAIL PROTECTED] To: ApacheCon Announcements [EMAIL PROTECTED], Apache Announcements [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL

Segmentation Fault

2000-06-07 Thread Pierre Laplante
I am using RH 6.2, mod-perl 1.24, apache 1.3.12 with the following program with Apache/registry: #!/usr/bin/perl -w use strict; my $p = new xyz; for(my $i=0; $i 10; ++$i) { for(my $j=1;$j100;++$j) { my $file = "../xml/$j.xml"; my $t = $p - loadxml($file); } } print

Re: [performance/benchmark] printing techniques

2000-06-07 Thread Frank Wiles
.--[ Jeff Norman wrote (2000/06/07 at 14:27:29) ]-- | | Frequently, it's hard to build up an entire output segment without | code in-between the different additions to the output. I guess you could | call this the "append, append, append... output" technique. | | I think it

[performance/benchmark] $|=1 doesn't matter ?!

2000-06-07 Thread Stas Bekman
Ok, you'd get surprised on this one. I cannot make benchmark show me unbuffered output worse than buffered. Anyone can tell me why? there is ap_flash call after each print in the unbuffered case, how comes the results are the same? name | avtime completed failedrps

[OT] Re: [performance/benchmark] printing techniques

2000-06-07 Thread Perrin Harkins
On Wed, 7 Jun 2000, Matt Sergeant wrote: On Wed, 7 Jun 2000, Eric Cholet wrote: This said, i hurry back to s/"constant strings"/'constant strings'/g; Those two are equal. Yes, although it's counter-intutive there's no real performance hit from double-quoting constant strings. The one

RE: [performance/benchmark] printing techniques

2000-06-07 Thread Jerrad Pierce
What about heredoc with the magical @{} technique for interpolating functions? or Text::iPerl ? I'd be interested in knwing how they stack up o _ /|/ | Jerrad Pierce \ | __|_ _| /||/ http://pthbb.org . | _| | \|| _.-~-._.-~-._.-~-._@"

Re: [performance/benchmark] printing techniques

2000-06-07 Thread Stas Bekman
What the other programmer here and I do is setup an array and push() our lines of output onto it throughout all our code, and print it at the very end. I'd be interested in seeing benchmarks of this vs. the other methods. I'll try to find the time to run them. handler:

Fwd: Re: [ID 20000527.001] Carp::Heavy - Bizarre copy of HASH in aassign

2000-06-07 Thread Jeremy Howard
You might remember the 'Bizarre copy of HASH in aassign' when using CGI::Carp I posted a workaround for... Here's an update from Perl 5 Porters--it's being fixed in the next release: - Original message - From: Gurusamy Sarathy [EMAIL PROTECTED] To: Jeremy Howard [EMAIL PROTECTED] Date:

Re: Big pages and gzip

2000-06-07 Thread Ken Williams
[EMAIL PROTECTED] (Stas Bekman) wrote: On Wed, 7 Jun 2000, Mark Hewis wrote: it would seem to be quite straight forward to implement a handler to gzip all output html files depending on the allowed mime-types and/or user_agent. This would reduce many pages by up to a factor of 10 in size.

Re: Big pages and gzip

2000-06-07 Thread Stas Bekman
On Wed, 7 Jun 2000, Ken Williams wrote: [EMAIL PROTECTED] (Stas Bekman) wrote: On Wed, 7 Jun 2000, Mark Hewis wrote: it would seem to be quite straight forward to implement a handler to gzip all output html files depending on the allowed mime-types and/or user_agent. This would

Apache, Mod_Perl and Custom Access/Authentication

2000-06-07 Thread Steffers
hello, first let me apologise for jst jumping straight into asking questions on the mailing list, but this is really puzzling me. First some background. I have been using perl for the past 3 years. I think (note +think+) that I understand perl quite well, so when the job came up

ANNOUNCE: mod_perl Guide 1.24

2000-06-07 Thread Stas Bekman
mod_perl Guide Version 1.24 Jun 7, 2000 has been released. The online version: http://perl.apache.org/guide/ The PDF version: 631pages (1,810KB compressed) http://perl.apache.org/guide/mod_perl_guide.pdf.gz The sources at CPAN: file:

regular cgis and mod_include and/or Apache::SSI

2000-06-07 Thread Alex Menendez
Hello, all I have a very simple problem for which I am sure (hope) there is a very simple solution. I basically want to pipe cgi output to mod_include or rather the equivalent mod_perl module, Apache::SSI. I do not want to make the cgis mod_perl modules nor Apache::Registery scripts. Just want

Apache::ASP

2000-06-07 Thread Clement Law
I get a 500 Internal Server Error when I try to run a ASP file. I'm using Windows NT Server. And the webserver I'm using is Apache V1.3.12 with Mod_perl Perl: c:\usr\perl\bin ASP.PM: c:\usr\perl\site\lib\apache\asp.pm Other: c:\usr\perl\lib I'm using Virtual Hosts in Apache too. I have no clue

Any suggestions or help, Thanks

2000-06-07 Thread Hui Zhu
Hi Everybody: I got big problems. Same query and same script. Sometimes it works fine but sometimes i get the following errors (i am so frustrated, have no idea what i need to do): DBD::mysql::db do failed: MySQL server has gone away at cnznetmod.pm line 151. DBD::mysql::st execute failed:

Re: Apache::ASP

2000-06-07 Thread ___cliff rayman___
i've never used Apache::Asp, but i thought it was used to embed perl using asp constructs. what you have looks like visual basic which is microsoft ONLY stuff. it should say this in the intro to the docs somewhere. -- ___cliff [EMAIL PROTECTED] Clement Law wrote: I get a 500 Internal

Apache::ASP

2000-06-07 Thread Clement Law
I get a 500 Internal Server Error when I try to run a ASP file. I'm using Windows NT Server. And the webserver I'm using is Apache V1.3.12 with Mod_perl Perl: c:\usr\perl\bin ASP.PM: c:\usr\perl\site\lib\apache\asp.pm Other: c:\usr\perl\lib I'm using Virtual Hosts in Apache too. I have no clue

Re: ANNOUNCE: mod_perl Guide 1.24

2000-06-07 Thread Stas Bekman
This is notify you that Randy's guide search engine's content is up to date, and Vivek's version is almost up-todate, so you can use both now. Enjoy! _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker

PerlTransHandler and CGI.pm

2000-06-07 Thread Eric Jain
When processing the url http://biodoc.ch/de/search?query=%2Btest+%2Bdna+-xyz , $cgi-param('query') correctly returns '+test +dna -xyz'. But if I use http://biodoc.ch/de/search;query=%2Btest+%2Bdna+-xyz instead, I get ' test dna -xyz'. If I include a %3F (=?) in the url, I even get a 404 error.