Re: Strange problem with IE 5

2000-12-08 Thread ek


  The record in access_log:
 
  192.168.2.11 - - [date] "GET /file.htm HTTP/1.1" 200 8731 "-"
  "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0")"

 what's in your error_log?

[Fri Dec  8 11:14:00 2000] [info] created shared memory segment
#256
[Fri Dec  8 11:14:00 2000] [notice] Apache/1.3.14 (Unix)
mod_perl/1.24_01 config
ured -- resuming normal operations
[Fri Dec  8 11:14:00 2000] [info] Server built: Dec  8 2000
11:12:10

No error messages.

 Why do you use ETag header?

Good question :)
I didn't enable the usage of ETag somehow explicitly. I don't
know why it is used.

Now i'm trying to use minimal config. Here is my httpd.conf:

# Global Environment

ServerType standalone
ServerRoot "/home/httpd"
PidFile /var/run/httpd.pid
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150
MaxRequestsPerChild 0

# Main server configuration

Port 80
User www
Group www
DocumentRoot "/home/httpd/web"

Directory /
Options None
AllowOverride None
Order deny,allow
Deny from all
/Directory

Directory "/home/httpd/web"
Options None
AllowOverride None
Order allow,deny
Allow from all
/Directory

UseCanonicalName On

IfModule mod_mime.c
TypesConfig /etc/httpd/conf/mime.types
/IfModule

DefaultType text/plain
HostnameLookups Off
ErrorLog /var/log/httpd/error_log
LogLevel debug
ServerSignature On

IfModule mod_setenvif.c
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0
force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
/IfModule

List of compiled-in modules:
  http_core.c
  mod_log_config.c
  mod_mime.c
  mod_include.c
  mod_dir.c
  mod_cgi.c
  mod_alias.c
  mod_access.c
  mod_auth.c
  mod_setenvif.c
  mod_perl.c

  Accept-Ranges: bytes
  Content-Length: 0

 No content?

This is very strange for me too. But even if content-length is 0,
the document is retrieved properly with GET.

ek




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Help needed with MAP expression

2000-12-08 Thread Matt Sergeant

On Thu, 7 Dec 2000, bari wrote:

 Hi there,
 Can any one help me what this MAP function does...

  map(/^[\.\d]+$/ ? td({-align='right'}, $_) : td($_), @$_)

$_ contains an array ref. It loops through each entry in the array ref. If
the entry is a number (by the above regexp's naive view of numbers), it
maps it to td align="right"number/td, otherwise it maps it to
tdvalue/td.

The use of $_ as the container for the array ref, while using map (which
gives you a $_ inside the map expression) is scary scary obfuscated
nastiness and deserves a slap for whoever wrote it.

-- 
Matt/

/||** Director and CTO **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** Personal Web Site: http://sergeant.org/ **
 \\//
 //\\
//  \\


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




[ANNOUNCE] new site: scaling mod_perl (+tool: mod_perl + DBD::Oracle)

2000-12-08 Thread Ed Park

The enterprise mod_perl architectures idea that I posted earlier has evolved
into a slightly modified idea: a 'scaling mod_perl' site:
http://www.lifespree.com/modperl.

The point of this site will be to talk about  synthesize techniques for
scaling, monitoring, and profiling large, complicated mod_perl
architectures.

So far, I've written up a basic scaling framework, and I've posted a
particular development profiling tool that we wrote to capture, time, and
explain all SQL select queries that occur on a particular page of a mod_perl
+ DBD::Oracle application:
-http://www.lifespree.com/modperl/explain_dbitracelog.pl
-http://www.lifespree.com/modperl/DBD-Oracle-1.06-perfhack.tar.gz

Currently, I'm soliciting thoughts and code on the following subjects in
particular:
1. Performance benchmarking code. In particular, I'm looking for tools that
can read in an apache log, play it back realtime (by looking at the time
between requests in the apache log), and simulate slow  simultaneous
connections. I've started writing my own, but it would be cool if something
else out there existed.
2. Caching techniques. I know that this is a topic that has been somewhat
beaten to a pulp on this list, but it keeps coming up, and I don't know of
any place where the current best thinking on the subject has been
synthesized. I haven't used any caching techniques yet myself, but I intend
to begin caching data at the mod_perl tier in the next version of my
application, so I have a very good incentive to synthesize and benchmark
various techniques. If folks could just send me pointers to various caching
modules and code, I'll test them in a uniform environment and let folks know
what I come up with. Or, if someone has already done all that work of
testing, I'd appreciate if you could point me to the results. I'd still like
to run my own tests, though.

If folks could point me towards resources/code for these topics (as well as
any other topics you think might be relevant to the site), please let me
know. I'm offering to do the legwork required to actually test, benchmark,
and synthesize all of this stuff, and publish it on the page.

I'm also still interested in actually talking with various folks. If anyone
who has been through some significant mod_perl scaling exercise would like
to chat for 15-30 minutes to swap war stories or tactical plans, I'd love to
talk with you; send me a private email.

cheers,
Ed


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [ANNOUNCE] new site: scaling mod_perl (+tool: mod_perl +DBD::Oracle)

2000-12-08 Thread Stas Bekman

On Fri, 8 Dec 2000, Ed Park wrote:

 The enterprise mod_perl architectures idea that I posted earlier has evolved
 into a slightly modified idea: a 'scaling mod_perl' site:
 http://www.lifespree.com/modperl.

Ed, this is all cool, but is it possible that we put this on one of the
public sites? At some point you will probably become too busy to maintain
this site... And maintaining the site whose sources are in HTML is a big
mess.

My suggestion is to pick the guide's code code base (Pod::HtmlPSPdf),
write in POD and deliver it as a separate package e.g. 'scale', which then
can be placed to perl.apache.org/scale or else and maintained with CVS. It
will also allow you to deliver ps/pdf formats. Re-use the existing mirrors
structure and the search facilities.

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: RFC: mod_perl advocacy project resurrection

2000-12-08 Thread harilaos

One simple question please.

How do you differentiate between perl programmers amd Mod_perl
programmers?

Thanks

Stas Bekman wrote:
 
   I've dropped my last job, in order to finally finish the mod_perl book,
   have some rest and make a push to mod_perl.
  
 
  Well best of luck  hope you have a good rest - I'll certainly buy the
  book!
 
 :)
 
   I see two main streams:
   1) Online zines.
   2) Conferences.
  
   I think that we should start working on locating ezines wanting to publish
   mod_perl related articles (preferrably for a fee, to give incentives for
   others to write) and conferences where mod_perl can be relevant. The data
   is to be collected and distributed to the people who wish to advocate
   mod_perl, thru written articles and conference classes. I suppose that we
   will also look for companies who want to order mod_perl classes and find
   the teachers in the appropriate areas.
 
  I think may people could write simple "How to ZXY" in mod_perl.  PHP has
  excellent resources for similar things i.e how to do this or that.  Very
  much like the Perl Cookbook.
 
  I am not saying that mod_perl does not have these, and the guide has
  some excellent examples, but these are often not easy to find and will
  not attact people half as much as reading a single all-in one atricle.
 
 Right, so anybody wants to get famous (well at least a little :), you
 wrote some cool code snippet -- describe the gist, attach the source and
 let others look over it. Sort of WebTechniques columns by Randal.
 
   May be we could organize some certification classes, to give more PR to
   mod_perl.
 
  Not wishing to sound negative - but certification more often causes
  problems - MCSE's a case in point.
 
 well, may be. Obviously we don't need certifications when we cannot find
 mod_perl programmers at all. I just thought about it as the
 counter-intuitive solution -- create the certification program and make
 people think that there are so many mod_perl programmers that we there was
 a need for a certification -- which will bring to the interest, since
 people believe that if someone is running certification program it must be
 good. And then once started to learn Perl/mod_perl he is actually going to
 realize that it's good indeed.
 
  Overall Stas I think more aticles in the general IT press be it ezines
  or in paper is the way to go to raise the profile.
 
 Yeah, but I don't seem to make other interested. I don't know why. Folks
 are too busy I guess.
 
  As an aside whats happening to perl month ? as this appears to be
  exactly the sort of thing we need.
 
 I don't know. Baiju told me back in August that he resumes the
 functionality but he has dissapeared since then. I'll try to reach him.
 
 _
 Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
 http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
 mailto:[EMAIL PROTECTED]   http://apachetoday.com http://jazzvalley.com
 http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: RFC: mod_perl advocacy project resurrection

2000-12-08 Thread Stas Bekman

On Fri, 8 Dec 2000, harilaos wrote:

 One simple question please.
 
 How do you differentiate between perl programmers amd Mod_perl
 programmers?

If you are in a public transportation and you happen to overhear this kind
of discussion:

"...all children were running and refused to respond. I've tried to killed
them but in vain, they refused to die, and were just hanging there. So
I've killed their parent and the children have gone for good. Next time
I'd know to kill the parent first..."

Ask the guys whether they are available, because you have a job for them,
but do it discreetly... 

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [ANNOUNCE] new site: scaling mod_perl (+tool: mod_perl + DBD::Oracle)

2000-12-08 Thread Gerald Richter

 2. Caching techniques. I know that this is a topic that has been somewhat
 beaten to a pulp on this list, but it keeps coming up, and I don't know of
 any place where the current best thinking on the subject has been
 synthesized. I haven't used any caching techniques yet myself, but I
intend
 to begin caching data at the mod_perl tier in the next version of my
 application, so I have a very good incentive to synthesize and benchmark
 various techniques. If folks could just send me pointers to various
caching
 modules and code, I'll test them in a uniform environment and let folks
know
 what I come up with. Or, if someone has already done all that work of
 testing, I'd appreciate if you could point me to the results. I'd still
like
 to run my own tests, though.


Embperl 2.0 will have build in caching. I hope to release the first beta
during the next week

Gerald

-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: RFC: mod_perl advocacy project resurrection

2000-12-08 Thread Gunther Birznieks

The mod_perl programmer has no hair left.

:)

At 11:19 AM 12/8/2000 +, harilaos wrote:
One simple question please.

How do you differentiate between perl programmers amd Mod_perl
programmers?

Thanks

Stas Bekman wrote:
 
I've dropped my last job, in order to finally finish the mod_perl book,
have some rest and make a push to mod_perl.
   
  
   Well best of luck  hope you have a good rest - I'll certainly buy the
   book!
 
  :)
 
I see two main streams:
1) Online zines.
2) Conferences.
   
I think that we should start working on locating ezines wanting to 
 publish
mod_perl related articles (preferrably for a fee, to give 
 incentives for
others to write) and conferences where mod_perl can be relevant. 
 The data
is to be collected and distributed to the people who wish to advocate
mod_perl, thru written articles and conference classes. I suppose 
 that we
will also look for companies who want to order mod_perl classes and 
 find
the teachers in the appropriate areas.
  
   I think may people could write simple "How to ZXY" in mod_perl.  PHP has
   excellent resources for similar things i.e how to do this or that.  Very
   much like the Perl Cookbook.
  
   I am not saying that mod_perl does not have these, and the guide has
   some excellent examples, but these are often not easy to find and will
   not attact people half as much as reading a single all-in one atricle.
 
  Right, so anybody wants to get famous (well at least a little :), you
  wrote some cool code snippet -- describe the gist, attach the source and
  let others look over it. Sort of WebTechniques columns by Randal.
 
May be we could organize some certification classes, to give more PR to
mod_perl.
  
   Not wishing to sound negative - but certification more often causes
   problems - MCSE's a case in point.
 
  well, may be. Obviously we don't need certifications when we cannot find
  mod_perl programmers at all. I just thought about it as the
  counter-intuitive solution -- create the certification program and make
  people think that there are so many mod_perl programmers that we there was
  a need for a certification -- which will bring to the interest, since
  people believe that if someone is running certification program it must be
  good. And then once started to learn Perl/mod_perl he is actually going to
  realize that it's good indeed.
 
   Overall Stas I think more aticles in the general IT press be it ezines
   or in paper is the way to go to raise the profile.
 
  Yeah, but I don't seem to make other interested. I don't know why. Folks
  are too busy I guess.
 
   As an aside whats happening to perl month ? as this appears to be
   exactly the sort of thing we need.
 
  I don't know. Baiju told me back in August that he resumes the
  functionality but he has dissapeared since then. I'll try to reach him.
 
  _
  Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
  http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
  mailto:[EMAIL PROTECTED]   http://apachetoday.com http://jazzvalley.com
  http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

__
Gunther Birznieks ([EMAIL PROTECTED])
eXtropia - The Web Technology Company
http://www.extropia.com/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Test -- Please Ignore

2000-12-08 Thread darren chamberlain


-- 
Half of all epigrams exaggerate, and this is one of them.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [ANNOUNCE] new site: scaling mod_perl (+tool: mod_perl + DBD::Oracle)

2000-12-08 Thread Tim Bunce

On Fri, Dec 08, 2000 at 05:47:00AM -0500, Ed Park wrote:
 
 So far, I've written up a basic scaling framework, and I've posted a
 particular development profiling tool that we wrote to capture, time, and
 explain all SQL select queries that occur on a particular page of a mod_perl
 + DBD::Oracle application:
 -http://www.lifespree.com/modperl/explain_dbitracelog.pl

The docs should at least mention the ora_explain tool from Alan
Burlison (a Sun performance guy) that's included in the DBD::Oracle
distribution.

It'll let you and and explain the queries that are _actually_ slow or
expensive, in priority order, rather than drown in the explain plans of
many queries.

Tim.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: RFC: mod_perl advocacy project resurrection

2000-12-08 Thread Greg Cope

[EMAIL PROTECTED] wrote:
 
 On Thu, 7 Dec 2000, Matt Sergeant wrote:
 
snippage 

  I'd love that. In fact anything that anyone had waiting to go onto
  PerlMonth please drop a mail to [EMAIL PROTECTED] and we'll get you
  published. (assuming that PerlMonth isn't going to resurrect itself)
 
 Actually its kinda has been resurrected. Or it will be on the upcoming
 monday. There are a lot of mod_perl articles on PelrMonth and it will
 continue.
 
 Next issue has an article by Stas and Gerald Richter. As far as articles
 are concerned perlmonth.com has about 20 or so mod_perl related articles.
 
 I know I've kinda been absent for some time. And I want to publicly
 apologize to the readers and the writers.

Hurray !

Can I say thanks - I like perl month!

Is the HTML::Template part 2 in there ?

Is it back for "good" (good = 3 plus months ?)

Greg

 
 But the next issue will be out upcoming monday.
 
 I am also contemplating on starting www.apachemonth.com, and looking for
 someone to possibly write mod_perl related articles on such topics like,
 handling different phases of Apache with mod_perl, writing
 PerlTransHandlers, explanations on *Handlers, stuff that is more closely
 related to Apache, rather than templating solutions and such, which serve
 better under PerlMonth.
 
 If anyone is interested in that please drop me a line or two.
 
 -
 Baiju Thakkar
 http://www.perlmonth.comhttp://www.linuxmonth.com
 Just use Perl;  #!/boot/linux
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Protecting the soucecode

2000-12-08 Thread Per Moeller

Hi,

My boss is constantly complaining about, that the sourcecode for mod_perl
script can be read, copied and altered by 3rd party hosting partners for our
solutions based on mod_perl.

So my question is, are there any way to encrypt or compile mod_perl script,
so that they cannot be view by anybody?

// Per Moeller


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Protecting the soucecode

2000-12-08 Thread John Reid

Hi

Stas Answered this last May
http://www.bitmechanic.com/mail-archives/modperl/May1999/0249.html

You could also try RJ's Perl Obfuscator (first result from Google searching
for perl obfuscator)

I haven't tried either of these. We usually print the source code and post
it to ourselves via registered mail, one script per envelope. These should
then be deposited at a bank, lawyer, or similar. In the event of a dispute,
the print out is admisible in court as evidence. We haven't used it yet, but
songwriters use the same system.

John Reid
OpenConnect (Ireland) Ltd

 -Original Message-
 From: Per Moeller [mailto:[EMAIL PROTECTED]]
 Sent: 08 December 2000 14:04
 To: [EMAIL PROTECTED]
 Subject: Protecting the soucecode


 Hi,

 My boss is constantly complaining about, that the sourcecode for mod_perl
 script can be read, copied and altered by 3rd party hosting
 partners for our
 solutions based on mod_perl.

 So my question is, are there any way to encrypt or compile
 mod_perl script,
 so that they cannot be view by anybody?

 // Per Moeller


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 ---
 Incoming mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.215 / Virus Database: 101 - Release Date: 16/11/2000

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.215 / Virus Database: 101 - Release Date: 16/11/2000


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Alliance? WAS - Re: RFC: mod_perl advocacy project resurrection

2000-12-08 Thread Robin Berjon

At 08:13 08/12/2000 +0800, Gunther Birznieks wrote:
The could be although ActiveState has a product that competes with mod_perl 
on the NT side called PerlEx.

What is too bad about the silence about the relationship is that PerlEx as 
a product could really benefit from evolving upon the back of a mod_perl 
code base.

In addition to that, they also have Zope-Perl, which iirc is run for AS by
Gisle Aas, who probably knows a lot about mod_perl. Now if AS would support
mod_perl, they'd get a very broad range of products for the dynamic server
marketplace. That could be a good argument for them support mod_perl.

-- robin b.
Paranoids are people, too; they have their own problems.  It's easy to
criticize, but if everybody hated you, you'd be paranoid too.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: mod_perl advocacy project resurrection

2000-12-08 Thread Jim Woodgate


Matthew Kennedy writes:
  If I were developing an application
  which fit well into the two-tier model however, a mod_perl based plan
  would be my first preference -- development time is shorter than
  JSP/Servlet and maintainability is _at_least_ comparible.

I would add that the "java is easier to maintain" issue is IMHO the
biggest myth of java.  I've seen a bunch of over-engineered java the
past couple of years and when something goes wrong, be afraid! :)

-- 
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Certification

2000-12-08 Thread Bakki Kudva

The need for certification is a symptom of different problem, which is
that the interview process has become too casual. Interviewers are
uncomfortable asking the tought questions so they resort to asking the
candidate about his hobbies etc. Many years ago a friend of mine who
interviewed for HP told me that he had to take a test and was grilled
intensely by serveral engineers in sequence before getting hired. Some
one even made him solve a partial differential equation on the spot!
(this was an RD job) He said that he had never sweated that much during
any of his exams in college :)

I think the best system might be for each company to design a 15 minute
test with a dozen questions skewed to their particular needs and see how
the applicant does. It could even be a slightly longer take home test
with follow up during the interview process. Tougher the interview, the
better the guage of how the person will do under pressure. The
certification process is a responsibility for which the companies are
passing the buck on (literally speaking) to the testing firms.

bakki
-- 
  _ _
 .-. |M|S|  Bakki Kudva
 |D|_|a|y|  Navaco
 |o|m|n|s|\420 Pasadena Drive
 |c|e|a|t| \\   Erie, PA 16505-1037
 |u|n|g|e|  \\  http://www.navaco.com/
 | |T|e|m|   \ ph: 814-833-2592
""  fax:603-947-5747
e-Docs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Sys::Signal Weirdness

2000-12-08 Thread Bill Moseley

This is slightly off topic, but my guess is Sys::Signal is mostly used by
mod_perl people.  Can someone else test this on their machine?

I have this weird problem where I'm not catching $SIG{ALRM}.  The test code
below is a simple alarm handler that looks like this:

eval {
local $SIG{__DIE__};
if ( $timeout  ) {
my $h = Sys::Signal-set(
ALRM = sub { die "Timeout after $timeout seconds\n" }
);
warn "Set Signal $h\n";
alarm $timeout;
}
print "Test 1 Parent reading: $_" while FH;

alarm 0 if $timeout;
};

This isn't working -- but if I simply comment out the if ( $timeout ) block
it works. 

Here's the output on my machine.

perl test.pl

Starting test2 - WITHOUT 'if ( $timeout )'
Set Signal Sys::Signal=SCALAR(0x810d120)
in child loop 12423
Test 2 Parent reading: 1
Test 2 Parent reading: 2
Test 2 Parent reading: 3
Timeout after 4 seconds  --- good!

Starting test1 - with 'if ( $timeout )'
Set Signal Sys::Signal=SCALAR(0x810d12c)
in child loop 12424
Test 1 Parent reading: 1
Test 1 Parent reading: 2
Test 1 Parent reading: 3
Alarm clock --- huh?

Here's some cut-n-paste test code.  This is what I get on Linux under 5.6.

#!/usr/local/bin/perl -w
use strict;

test2();
test1();

$|= 1;

use Sys::Signal;

sub test1 {
warn "\nStarting test1 - with 'if ( \$timeout )'\n";


   my $child = open( FH, '-|' );
   die unless defined $child;

   loop() unless $child;  # not that this works

my $timeout = 4;

eval {
local $SIG{__DIE__};
if ( $timeout  ) {
my $h = Sys::Signal-set(
ALRM = sub { die "Timeout after $timeout seconds\n" }
);
warn "Set Signal $h\n";
alarm $timeout;
}
print "Test 1 Parent reading: $_" while FH;

alarm 0 if $timeout;
};


if ( $@ ) {
   warn $@;
   kill( 'HUP', $child );
}
}

sub test2 {
warn "\nStarting test2 - WITHOUT 'if ( \$timeout )'\n";


   my $child = open( FH, '-|' );
   die unless defined $child;

   loop() unless $child;

my $timeout = 4;

eval {
local $SIG{__DIE__};
   ### if ( $timeout  ) {
my $h = Sys::Signal-set(
ALRM = sub { die "Timeout after $timeout seconds\n" }
);
warn "Set Signal $h\n";
alarm $timeout;
   ### }
print "Test 2 Parent reading: $_" while FH;

alarm 0 if $timeout;
};


if ( $@ ) {
   warn $@;
   kill( 'HUP', $child );
}
}


sub loop {
$|=1;
my $x;
warn "in child loop $$\n";
sleep 1, ++$x, print "$x\n"  while 1;
}


Bill Moseley
mailto:[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




[BUG] Apache 1.3.14 front-end-back-end weirdness.

2000-12-08 Thread BeerBong

Hello!

I tried to migrate to Apache 1.3.14 from 1.3.12 ...
Heh.
After recompiling apache and starting the server with the same config get
400 Bad request on any request to mod_perl back-end server. Static html and
images are returned ok.

Some time was spent for hunting the problem.
Turn on rewriting log with level 9.

RewriteEngine On
RewriteLogLevel 9
RewriteLog /var/apache/simple_d/logs/rewrite.log
RewriteMap ports txt:/usr/local/apache/conf/port_d.map
RewriteRule ^/(.*\.s?asp)$ http://$host:${ports:%{SERVER_PORT}|8081}/$1
[P,L]

Request
/paper/test.asp
translated to
http://www.samara.ru:|8081}/paper/test.asp

It seems that mod_rewrite processes nested back references not correctly.
Just meets first closing brace and consider it as back reference.

I saw mod_rewrite fixes in CHANGES list, but it seems to be a candidate for
new fix.

During this hunting I found another security hole of my config...
http://forum.swarthmore.edu/epigone/modperl/shugrendbax/24191847.NAA4593
[EMAIL PROTECTED]
Proxy hijakers used my site very active, althoug in config was

RewriteRule ^proxy:.* - [F]

Fixed via ProxyRequests off...

--
Sergey Polyakov - chief of WebZavod
http://www.webzavod.ru


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: [certification]

2000-12-08 Thread Hill, David T - Belo Corporate



-Original Message-
From: Gunther Birznieks [mailto:[EMAIL PROTECTED]]

"Obviously they still have to be technically interviewed, but in lieu of 
someone with or without certification, it's easier to short-list on the 
basis of such certification (or some equivalent outstanding thing such as 
contributing to CPAN)."

If you are 'short-listing' based on certification, you may be 
missing your best candidates...


David Hill

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Sys::Signal Weirdness

2000-12-08 Thread Stas Bekman

On Fri, 8 Dec 2000, Bill Moseley wrote:

 This is slightly off topic, but my guess is Sys::Signal is mostly used by
 mod_perl people.  Can someone else test this on their machine?

That's on-topic, Sys::Signal was written by Doug especially for mod_perl
:) Its use should go away when 5.6.1 will be released.

 I have this weird problem where I'm not catching $SIG{ALRM}.  The test code
 below is a simple alarm handler that looks like this:
 
 eval {
 local $SIG{__DIE__};
 if ( $timeout  ) {
 my $h = Sys::Signal-set(
 ALRM = sub { die "Timeout after $timeout seconds\n" }
 );
 warn "Set Signal $h\n";
 alarm $timeout;
 }
 print "Test 1 Parent reading: $_" while FH;
 
 alarm 0 if $timeout;
 };
 
 This isn't working -- but if I simply comment out the if ( $timeout ) block
 it works. 

Easy. Look at $h -- it's a lexically scoped variable, inside the block 
if($timeout){}. Of course when the block is over the setting disappears,
when $h gets DESTROYed.


_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: mod_perl training (was Re: Certification)

2000-12-08 Thread Richard Dice

"Randal L. Schwartz" wrote:

 But here's the reality of trainings.  You need to get 10 to 20 people
 in a room at the same time that are all starting roughly at the same
 skill level and also want to end up in the same place.  And then you
 need to do that about 8 to 20 times with the same slide set before you
 break even, because the cost of producing the materials is pretty
 high: figure one to three DAYS of research for every HOUR of face time
 in the classroom.

I've been lucky enough to "inherit" (as a subcontractor) sets of Perl
training materials put together by a really decent guy named James.
I shudder to think of the time investment he made in creating that stuff. 
He and I have talked from time to time about revising/updating the 
existing materials, and maybe even creating some new courses, but how to
find the time...

Mod_perl is a topic I'd really like to work on -- both in terms of 
teaching and also in putting together the training materials to begin 
with.  I've yet to figure out the "magic formula" to make this work, 
though.

 I can't figure out where the "start" and "finish" are with mod_perl
 that would make sense for 80 to 400 people.  It's not core techology,
 like the llama.  We target the llama as how you would want ANY perl
 hacker to spend their first 30 hours.  But what 20-30 hours are
 *common* for any mod_perl hacker?  And what do you do for pre-reqs?

These are all really good points.

One other slightly-more-minor consideration when it comes to teaching
a Perl course is system set-up.  If you control the training environment,
(ie. you have your own classroom and students come out to it) then this
isn't a problem.  But if you teach at the client's location, then it can 
be an issue trying to get their machines configured to the point where you
can actually have workshops on what you teach.  Mod_perl is a biggie in
terms of the kind of setup you have to do:  you need a lot of Perl modules
installed on the machine, a recent version of Perl, source-code level
acceses to building Apache, and not just the time needed to do this to a
classroom full of computers, but also _permission_.

That all said, I'm sure there will be mod_perl courses available somehow,
someday.  5000(0(0?)?) mod_perl hackers can't be wrong. :-)
 
Cheers,
Richard

-- 

 Richard Dice * Personal 519 635 9568 * Fax 519 635 9569
 ShadNet Creator * http://shadnet.shad.ca/ * [EMAIL PROTECTED]
 Occasional Writer, HotWired * http://www.hotwired.com/webmonkey/
 "squeeze the world 'til it's small enough to join us heel to toe"
 - jesus jones

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: RFC: mod_perl advocacy project resurrection

2000-12-08 Thread bthak



On Fri, 8 Dec 2000, Greg Cope wrote:

 
   I'd love that. In fact anything that anyone had waiting to go onto
   PerlMonth please drop a mail to [EMAIL PROTECTED] and we'll get you
   published. (assuming that PerlMonth isn't going to resurrect itself)
  
  Actually its kinda has been resurrected. Or it will be on the upcoming
  monday. There are a lot of mod_perl articles on PelrMonth and it will
  continue.
  
  Next issue has an article by Stas and Gerald Richter. As far as articles
  are concerned perlmonth.com has about 20 or so mod_perl related articles.
  
  I know I've kinda been absent for some time. And I want to publicly
  apologize to the readers and the writers.
 
 Hurray !
 
 Can I say thanks - I like perl month!

You're welcome and Thank you for reading :)

 
 Is the HTML::Template part 2 in there ?

I had contacted Sam Tregar about 3 weeks ago. I didn't get a respond. It
won't be for this issue, but I'll try to get Part 2 for the next issue.
Sam, if you're reading this, drop me a note. 

 
 Is it back for "good" (good = 3 plus months ?)
 

Yes, Definately.

-
Baiju Thakkar
http://www.perlmonth.comhttp://www.linuxmonth.com
Just use Perl;  #!/boot/linux


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




WWW and PROXY auth when using Apache as authetifying reverse-proxy

2000-12-08 Thread Jean-Pierre . Morant

Hello all.

I'm using Apache's latest version (1.3.14) and it seems I hit a wall someone
has
met before me. Basically the problem is as follows:
- I have a reverse proxy that works just fine thanks to ProxyPass and
ProxyPassReverse. Let's call him "rproxy". He "hides" a http server, I'll
call "server".
- when I ask for authentication on a resource located on "server" (using
either Location or Directory in the httpd.conf file of "rproxy"), "rproxy"
sends a PROXY auth to the client. I would expect a HTTP auth request...

Problem is that I want the PROXY to authenticate the user, not the back-end
server.
 
This problem has been identified and patched in a previous release  (mail
from  Graham Leggett ([EMAIL PROTECTED], but unfortunately the
address is not valid anymore), Date: Tue May 04 1999 - 04:49:47 EDT) ans is
mentionned in
http://perl.apache.org/guide/scenario.html#HTTP_Authentication_With_Two_Ser.
The latest document claims that "In the configuration file your Auth
configuration directives need to be inside the Directory ... ...
/Directory sections because if you use the section Location ... ...
/Location the proxy server will take the authentication information for
itself and not pass it on. " But I've tried Directory,  Location
(dirname), Location (urlname) with very limited success...

Has someone managed to make this work?

Thanks in advance...


Jean-Pierre Morant   
Office: +32 (0)2 2996751  
Mobile: +32 (0)478 201505
Fax:+32 (0)2 296085   
[EMAIL PROTECTED]
[EMAIL PROTECTED]

#include std.disclaimer.h
#define MOTTO "La vie serait tellement plus belle 
   si seulement nous avions les sources!"

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: [certification]

2000-12-08 Thread Steven Vetzal

 You miss the point.
 
 It's not about credentials in a boolean sense. It's about 
 probability and 
 statistics.

That's exactly true - in fact I'd go so far to say that the probably and
statistics vary for each type of certification.

I trust an M.D.'s certification far greater than I trust an MCSE
certification, because I can be pretty sure the doctor completed his
education and had to actually think a little to accomplish that. The MCSE,
not so much. A few months of memorization (quickly forgotten) does not mean
the same as 7 years in med school.

It all comes down to what certifications the employer trusts. We (in effect
the M.D.'s employer) trust their medical degree. Not because some company
ran a marketing campaign to tell us that we should, but from our own
experience, and the experience of others.

However, Microsoft simply runs an ad campaign telling employers that they
can trust MCSE's - and why should they believe otherwise? 8^(

Steve

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Sys::Signal Weirdness

2000-12-08 Thread Bill Moseley

At 04:42 PM 12/08/00 +0100, Stas Bekman wrote:
Easy. Look at $h -- it's a lexically scoped variable, inside the block 
if($timeout){}. Of course when the block is over the setting disappears,
when $h gets DESTROYed.

Doh!  I thought about that (which is why I was printing $h).  I shouldn't
debug before sunrise.

Sure is nice to have you back, Stas! ;)



Bill Moseley
mailto:[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [BUG] Apache 1.3.14 front-end-back-end weirdness.

2000-12-08 Thread Erdmut Pfeifer

On Fri, Dec 08, 2000 at 07:23:08PM +0400, BeerBong wrote:
 Hello!
 
 I tried to migrate to Apache 1.3.14 from 1.3.12 ...
 Heh.
 After recompiling apache and starting the server with the same config get
 400 Bad request on any request to mod_perl back-end server. Static html and
 images are returned ok.
 
 Some time was spent for hunting the problem.
 Turn on rewriting log with level 9.
 
 RewriteEngine On
 RewriteLogLevel 9
 RewriteLog /var/apache/simple_d/logs/rewrite.log
 RewriteMap ports txt:/usr/local/apache/conf/port_d.map
 RewriteRule ^/(.*\.s?asp)$ http://$host:${ports:%{SERVER_PORT}|8081}/$1
 [P,L]
 
 Request
 /paper/test.asp
 translated to
 http://www.samara.ru:|8081}/paper/test.asp
 
 It seems that mod_rewrite processes nested back references not correctly.
 Just meets first closing brace and consider it as back reference.


Hello,

I observed the same problem with nested ${}/%{} statements such as


RewriteMap   actrlprg:/usr/local/apache-1.3.12/bin/rewrite-map.pl
RewriteRule  ^/(ac-)?adm/?(.*)$   ${actrl:%{HTTP:Authorization}#a#/ac-adm/$2} [PT,L]
(... -- details irrelevant here)  ^


what seems to be causing the problem is that the brace directly
following "Authorization" is interpreted as the closing brace for "${"
instead of "%{".
From a quick glance at the code I would say that the strchr() in line 2261
of rewrite.c (the one distributed with 1.3.14) is responsible for this...

I don't know if nested statements such as these are by intention no
longer supported since the recent security-related patch (?)
Perhaps someone more knowledgable could comment on this -- thanks!


-- 
Erdmut Pfeifer
science+computing gmbh

-- Bugs come in through open windows. Keep Windows shut! --

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: debuggers

2000-12-08 Thread Bruce W. Hoylman

 "Dave" == Dave Rolsky [EMAIL PROTECTED] writes:

Dave On Thu, 7 Dec 2000, martin langhoff wrote:
 I wonder how do those hardcore guys that develop using handlers
 debug.  Mhhh. They must write 'perlfect' code, I guess, and/or
 understand those cryptic debuggers ...

Dave I just do a lot of debugging via warn statements and looking
Dave at the error logs.

My BEGIN block looks like this.  I realize IO is rather bulky, but I
like it and the environment I'm in isn't *that* busy where it makes a
significant impact.

BEGIN {

  # Wash the PATH.
  $ENV{'PATH'} = '/opt/gnu/bin:/usr/local/bin:/usr/bin';
  $ENV{'CDPATH'} = '';
  $ENV{'ENV'} = '';

  use IO::File;
  use CGI::Carp qw(carpout fatalsToBrowser carp);
  use Savvy::Conf qw(:WWWBasic);

  my $log = 1;
  my $logfile = "/www/cgi-logs/cgi-log";

  if ($log) {
my $LOG = IO::File-new(" $logfile") or
  Savvy::Conf::cab("Unable to open $logfile for writing: $!\n");

# Dupe STDERR.  Original is SAVEERR.
carpout($LOG);
  }
}

Then I 'tail -f' the $logfile, the Apache server error_log, and watch
watever comes to the broswer due to the fatalsToBrowser.  Works well for
me.

The '$r-log_reason' finds a home in my code as well.

Plus, I *always* use '-w' and '-T' and get them cleanly working during
development phases, although I shut them off for actual deployment.

Peace.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: debuggers

2000-12-08 Thread Matt Sergeant

On Fri, 8 Dec 2000, Bruce W. Hoylman wrote:

  "Dave" == Dave Rolsky [EMAIL PROTECTED] writes:

 Dave On Thu, 7 Dec 2000, martin langhoff wrote:
  I wonder how do those hardcore guys that develop using handlers
  debug.  Mhhh. They must write 'perlfect' code, I guess, and/or
  understand those cryptic debuggers ...

 Dave I just do a lot of debugging via warn statements and looking
 Dave at the error logs.

 My BEGIN block looks like this.  I realize IO is rather bulky, but I
 like it and the environment I'm in isn't *that* busy where it makes a
 significant impact.

 BEGIN {

   # Wash the PATH.
   $ENV{'PATH'} = '/opt/gnu/bin:/usr/local/bin:/usr/bin';
   $ENV{'CDPATH'} = '';
   $ENV{'ENV'} = '';

   use IO::File;
   use CGI::Carp qw(carpout fatalsToBrowser carp);
 ^^^

Bye bye exception handling.

-- 
Matt/

/||** Director and CTO **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** Personal Web Site: http://sergeant.org/ **
 \\//
 //\\
//  \\


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: debuggers

2000-12-08 Thread Stas Bekman

 Plus, I *always* use '-w' and '-T' and get them cleanly working during
 development phases, although I shut them off for actual deployment.

1. You cannot use -T under mod_perl, you should use PerlTaintCheck
instead: http://perl.apache.org/guide/porting.html#Taint_Mode

2. 'PerlTaintCheck On' is a must in production!!! not development:
* http://www.gunther.web66.com/FAQS/taintmode.html
* perldoc perlsec

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: debuggers

2000-12-08 Thread Vivek Khera

 "SB" == Stas Bekman [EMAIL PROTECTED] writes:

SB 2. 'PerlTaintCheck On' is a must in production!!! not development:

Huh?!?!?!?  It is a must always.  You can't develop without it and
then expect it to work with taint checking on at a later time.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED]   Rockville, MD   +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RFC: Apache::Thumbnail - Generate image thumbnails on the fly

2000-12-08 Thread Rufus . Cable

Hi -

Attached is an Apache module to automatically generate  cache thumbnail
images. It uses Image::Magick (http://www.simplesystems.org/ImageMagick/)
and File::Path (CPAN) and runs quickly enough to be useful on my
Apache/mod_perl machine. It's my first proper handler, so let me know if
there are any glaring ommissions or bugs! :)

Otherwise, if it's of use to anyone else, should I package this up and
submit it to CPAN as v1.0? Comments welcome!

Rufus.


 Thumbnail.pm

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


mod_perl IPC under Solaris 7

2000-12-08 Thread Steven Cotton

Hi,

Anyone here any good with debugging IPC "No space left on device" errors?
I can't find anything on the web or in deja, and am basically at a
loss. Using Storable 0.703 and ShareLite 0.08 I'm getting a lot of the
above errors when I have around 40 httpd children. Has anyone else used
IPC under mod_perl and had the same errors? I can't even seem to find out
what it is I'm running out of ..

Thanks,

-- 
steven


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: mod_perl IPC under Solaris 7

2000-12-08 Thread Mark Doyle


On Friday, December 8, 2000, at 12:10 PM, Steven Cotton wrote:

 Anyone here any good with debugging IPC "No space left on device" errors? 
 I can't find anything on the web or in deja, and am basically at a 
 loss. Using Storable 0.703 and ShareLite 0.08 I'm getting a lot of the 
 above errors when I have around 40 httpd children. Has anyone else used 
 IPC under mod_perl and had the same errors? I can't even seem to find out 
 what it is I'm running out of .. 

I suppose the first place to look is to use the Solaris
commands ipcs and ipcrm... Also, I believe you have to
update the kernerl parameters for shared memory. The default
is pretty skimpy. Look at adding things like:

set shmsys:shminfo_shmmax=33554432
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
set semsys:seminfo_semmns=400
set semsys:seminfo_semmni=140
set semsys:seminfo_semmnu=200

to /etc/system.

Cheers,
Mark

Mark Doyle
Manager, Project Development
The American Physical Society

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: debuggers

2000-12-08 Thread Stas Bekman

On Fri, 8 Dec 2000, Bruce W. Hoylman wrote:

  "Matt" == Matt Sergeant [EMAIL PROTECTED] writes:
 
 Matt On Fri, 8 Dec 2000, Bruce W. Hoylman wrote:
 
  use IO::File;
  use CGI::Carp qw(carpout fatalsToBrowser carp);
 Matt Bye bye exception handling.
 
 You mean eval{} block exception handling, or something else?  What are
 the technical specifics around this assertion?
 
 Thanks!  Maybe I'll learn something here, which is why I posted it in
 the first place.

http://perl.apache.org/guide/perl.html#Exception_Handling_for_mod_perl


_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: debuggers

2000-12-08 Thread Bruce W. Hoylman

 "Stas" == Stas Bekman [EMAIL PROTECTED] writes:

 Plus, I *always* use '-w' and '-T' and get them cleanly working
 during development phases, although I shut them off for actual
 deployment.

Stas 1. You cannot use -T under mod_perl, you should use
StasPerlTaintCheck
Stas instead: http://perl.apache.org/guide/porting.html#Taint_Mode

This is what I was referring to actually.  However, there are many
modules, such as Date::Manip, for example, that just will not load with
taint checking turned on.  In an intranet, it's not as big a deal as it
certainly is in the 'real world'.

But what can I do, short of rewritting the parts of the module that
don't function in with checking on

Stas 2. 'PerlTaintCheck On' is a must in production!!! not
Stasdevelopment:
Stas * http://www.gunther.web66.com/FAQS/taintmode.html
Stas * perldoc perlsec

Thanks for the input.

Peace.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: mod_perl training (was Re: Certification)

2000-12-08 Thread JoshNarins

In a message dated 12/8/00 10:48:13 AM Eastern Standard Time, [EMAIL PROTECTED] 
writes:


  I can't figure out where the "start" and "finish" are with mod_perl
  that would make sense for 80 to 400 people.  It's not core techology,
  like the llama.  We target the llama as how you would want ANY perl
  hacker to spend their first 30 hours.  But what 20-30 hours are
  *common* for any mod_perl hacker?  And what do you do for pre-reqs?

Make the course for someone who knows whatever
intermediate perl, knowing basic C will help the student.

Combine it with and advanced perl course.

Cover..

1. Using Perl to Configure Apache
2. .xs programming, and When to use It
3. Callback functions and what that means for signals
4. the mod_perl API
5. briefly, using apxs
5. "Fall back to" secure settings. CERT's safe CGI, Exec/CGI,
suexec, tcpd-wrappers, mod_ssl, 
anyone who runs anything under Apache::Registry has X privs
6. A sample mod_perl module (trans, Acc/Auth/Authz, fixup)
7. BlockRobot Timer et cetera as time allows



Re: [ANNOUNCE] new site: scaling mod_perl (+tool: mod_perl +DBD::Oracle)

2000-12-08 Thread Matt Sergeant

On Fri, 8 Dec 2000, Perrin Harkins wrote:

  1. Performance benchmarking code. In particular, I'm looking for tools
 that
  can read in an apache log, play it back realtime (by looking at the time
  between requests in the apache log), and simulate slow  simultaneous
  connections. I've started writing my own, but it would be cool if
 something
  else out there existed.

 The mod_backhand project was developing a tool like this called Daquiri.

I also have a tool here that you install as a TransHandler, and it reads
querystring and POST data [*] and saves it to an XML log file, then it
appends to the PerlHandler phase and dumps the output that would go to the
browser to the same XML log file (of course this requires the output to
be stored somewhere, like Apache::Filter does, rather than printed direct
to the browser). Then there's a little playback tool. Its a bit specific
to the app I'm working on, because there's code in place to make
Apache::Request a singleton and also collect the output, but I could be
persuaded to open it up to people.

[*] using Apache::Request at the moment - but we need to modify
Apache::Request to be a singleton as it can't be instantiated twice in the
same application at the moment.

-- 
Matt/

/||** Director and CTO **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** Personal Web Site: http://sergeant.org/ **
 \\//
 //\\
//  \\


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: debuggers

2000-12-08 Thread Matt Sergeant

On Fri, 8 Dec 2000, Bruce W. Hoylman wrote:

  "Matt" == Matt Sergeant [EMAIL PROTECTED] writes:

 Matt On Fri, 8 Dec 2000, Bruce W. Hoylman wrote:
 
  use IO::File;
  use CGI::Carp qw(carpout fatalsToBrowser carp);
 Matt Bye bye exception handling.

 You mean eval{} block exception handling, or something else?  What are
 the technical specifics around this assertion?

fatalsToBrowser installs a $SIG{__DIE__} handler, and so prevents you from
properly using eval{} blocks, or nice modules like Error.pm or
Class::Exception (or whichever way around Dave has it this week :-)

See my rant, erm, section in the guide on exception handling.

-- 
Matt/

/||** Director and CTO **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** Personal Web Site: http://sergeant.org/ **
 \\//
 //\\
//  \\


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: mod_perl advocacy project resurrection

2000-12-08 Thread Stas Bekman

On Fri, 8 Dec 2000, Keith G. Murphy wrote:

 Stas Bekman wrote:
  
  Let me stright things out a bit, so you won't get misleaded by my post as
  a marketing call.
  
  What we want is very simple.
  
  1. We want many users, so they will thoroughly test the software and spot
  bugs asap, so we -- current users will get a better product.
  
  2. We want more developers, so they will write core mod_perl and 3rd party
  modules, again for us current users to re-use and save development
  time. 
 [cut]
 
 It strikes me that there might be a route not yet taken to increase
 *availability* of mod_perl.

 Think about all the ISPs that host personal and small business web
 sites.  How many of them run Apache and allow their customers to code
 Perl scripts?

This route is partially taken. I've addressed these issue in one of the
previous articles
http://apachetoday.com/news_story.php3?ltsn=2000-11-27-001-01-OS-LF-PL

And if you have an ISP that you want to become aware of mod_perl (and
learn about problems and solution) please point them to this article.
 
 Earthlink (which is huge), for one.  Yet it doesn't have mod_perl
 installed.  But if it did, both Earthlink itself and the customers might
 see performance benefits from Apache::Registry scripting.
 
 The two biggest obstacles I see to this:
 
 (1) Have to have a *reliable* way for customers to reload their Registry
 scripts.  Here's where some development work might be needed.
 
 (2) It might be argued that anything that *needs* Registry is too
 heavy-duty for the ISP to want it running anyway.
 
 Thoughts?
 
 (I wonder if it might be possible to enlist the Apache folks to campaign
 for this as well, since anything that keeps out the dread IIS is
 desirable).

What do you mean by enlisting the Apache folks? 
When is the demostration :)

The real question is for someone to undertake the Safe module and make it
working for mod_perl. I think we have discussed this before. I don't
remember what was the conclusion.

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: mod_perl IPC under Solaris 7

2000-12-08 Thread Steven Cotton

Well,

I ended up trussing the processes:

semop(0, 0xFF0C4E70, 3) Err#28 ENOSPC

man semop produces:

 ENOSPCThe limit on the number  of  individual  processes
   requesting an SEM_UNDO would be exceeded.

So, I thought changing the shminfo_semmnu to a higher value would solve
it, since I have more than 30 httpd processes (semmnu default). No, error
persists. This isn't a mod_perl problem anymore so will be my last post,
but if anyone has any ideas they're greatfully received.

Cheers,

-- 
steven
1;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: debuggers

2000-12-08 Thread Stas Bekman

On Fri, 8 Dec 2000, Bruce W. Hoylman wrote:

  "Stas" == Stas Bekman [EMAIL PROTECTED] writes:
 
  Plus, I *always* use '-w' and '-T' and get them cleanly working
  during development phases, although I shut them off for actual
  deployment.
 
 Stas 1. You cannot use -T under mod_perl, you should use
 StasPerlTaintCheck
 Stas instead: http://perl.apache.org/guide/porting.html#Taint_Mode
 
 This is what I was referring to actually.  However, there are many
 modules, such as Date::Manip, for example, that just will not load with
 taint checking turned on.  In an intranet, it's not as big a deal as it
 certainly is in the 'real world'.

You should contact the author of the module and ask him to fix it. It's
possible that he doesn't aware of the taint issues. Usually for modules
that execute shell/fork but don't pass any tainted args, the fix is as
trivial as adding:

  $ENV{'PATH'} = '/bin:/usr/bin';
  delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};

(taken from perlsec manpage)

Hmm, may be we should find a way for modules to be taint checked before
these are allowed to CPAN? What do you think? sort of:

eval {`perl -cwT $_` for (*.pm) };


 But what can I do, short of rewritting the parts of the module that
 don't function in with checking on
 
 Stas 2. 'PerlTaintCheck On' is a must in production!!! not
 Stasdevelopment:
 Stas * http://www.gunther.web66.com/FAQS/taintmode.html
 Stas * perldoc perlsec
 
 Thanks for the input.

You are very welcome :)

 Peace.

Sex, drugs and rock-n-roll!


_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




IPC Linux -- WAS [Re: mod_perl IPC under Solaris 7]

2000-12-08 Thread Tom Harper

I have been looking for where I can set this setting
in (redhat) linux-- anyone have any pointers?

ipcs, ipcrm are there, but i don't have an etc/system.

very little documentation on this for linux (or bsd)
that i could find.

Tom

At 06:29 PM 12/8/00 +0100, Steven Cotton wrote:
On Fri, 8 Dec 2000, Mark Doyle wrote:

 I suppose the first place to look is to use the Solaris
 commands ipcs and ipcrm... Also, I believe you have to
 update the kernerl parameters for shared memory. The default
 is pretty skimpy. Look at adding things like:
 
 to /etc/system.

Yes, I have made some changes there. I have:

set shmsys:shminfo_shmmax = 8388608
set shmsys:shminfo_shmmni = 10240
set shmsys:shminfo_shmseg = 512

The man page for shmget says that for ENOSPC a shared memory identifier is
to be created but the system imposed limit on the maximum number of
allowed identifiers would be exceeded. I have set shmmni to 102400 and had
the same error. Can I actually see how many identifiers I have at one
time, and which processes are creating them?

Thanks,

-- 
steven


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: mod_perl IPC under Solaris 7

2000-12-08 Thread John Siracusa

Here's my long-winded setup.  I'm not sure how smart or dumb these settings
are, but they work for me on a machine with 1GB or RAM.  Note that I had to
change the semaphore settings too to get IPC::SharedCache to work without
complaint.

-John

---

*
* Shared memory settings changed by John Siracusa 9/19/2000
*

* Maximum size of system V shared memory segment that can be
* created. This parameter is an upper limit that is checked before the
* system sees if it actually has the physical resources to create the
* requested memory segment (default 1048576, max MAXINT/MAXINT64)

set shmsys:shminfo_shmmax = 8388608

* Minimum size of system V shared memory segment that can be created
* (default 1, max amount of physical memory

* set shmsys:shminfo_shmmin = 1

* System wide limit on number of shared memory segments that can be
* created (default 100, max MAXINT)

set shmsys:shminfo_shmmni = 1

* Limit on the number of shared memory segments that any one process
* can create (default 6, max 32767)

set shmsys:shminfo_shmseg = 1

*
* Semaphore settings changed by John Siracusa 9/19/2000
*

* Maximum number of semaphore identifiers (default 10, max 65535)

set semsys:seminfo_semmni = 6

* Maximum number of System V semaphores on the system (default 60, max
MAXINT)

set semsys:seminfo_semmns = 50

* Maximum value a semaphore can be set to (default 32767, max 65535)

* set semsys:seminfo_semvmx = 6

* Max number of semaphores per semaphore identifier (default 25, max MAXINT)

* set semsys:seminfo_semmsl = 100

* Maximum number of System V semaphore operations per semop(2)
* call. This parameter refers to the number of sembufs in the sops
* array that is provided to the semop() system call (default 10, max MAXINT)

* set semsys:seminfo_semopm = 50

* Maximum number of System V semaphore undo structures that can be
* used by any one process (default 10, max MAXINT)

* set semsys:seminfo_semume = 50

* Maximum value that a semaphore's value in an undo structure can be set to
* (default 16385, max 65535)

* set semsys:seminfo_semaem = 6


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: RFC: mod_perl advocacy project resurrection

2000-12-08 Thread Paul


--- Nathan Torkington [EMAIL PROTECTED] wrote:
[snip]
 I'd rather see us find some way to churn out perl and mod_perl
 programmers.  For instance, release a beginner class on Perl and
 mod_perl and have local Perlmongers lead classes.  I have my slides
 from the University of Perl, which I'd contribute to such an effort
 (they're pretty closely based around the Eagle book, and some of the
 details should be replaced with sections on Mason et al.).

Makes sense. How do we drum up business?

I went to a local traning firm and offered to teach classes on Perl.
The coordinators immediate (and breathlessly excited) response was "Do
you teach Java?" 

Grrr.

I could do Perl classes, for beginners to code or hardened veterans of
most other languages (yes, even C++ ;o)   

I don't think I know enough yet to take people's money for mod_perl or
Apache in general, but I don't *want* to teach Java. What should I do
do convince people that Perl is a Good Thing?

Maybe if we offered suitcase classes on sites like monster.com?

__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: RFC: Apache::Thumbnail - Generate image thumbnails on the fly

2000-12-08 Thread Stas Bekman

On Fri, 8 Dec 2000 [EMAIL PROTECTED] wrote:

 Hi -
 
 Attached is an Apache module to automatically generate  cache thumbnail
 images. It uses Image::Magick (http://www.simplesystems.org/ImageMagick/)
 and File::Path (CPAN) and runs quickly enough to be useful on my
 Apache/mod_perl machine. It's my first proper handler, so let me know if
 there are any glaring ommissions or bugs! :)
 
 Otherwise, if it's of use to anyone else, should I package this up and
 submit it to CPAN as v1.0? Comments welcome!

Check out these two first:

cpan i /Apache::Album/
Module id = Apache::Album
CPAN_USERID  WOODY (Jim Woodgate [EMAIL PROTECTED])
CPAN_VERSION 0.94
CPAN_FILEW/WO/WOODY/Apache-Album-0.94.tar.gz
INST_FILE(not installed)

cpan i /Apache::Magick/
Module id = Apache::Magick
DESCRIPTION  Image conversion on-the-fly
CPAN_USERID  MPB (mod_perl book (Doug and Lincoln) [EMAIL PROTECTED])
CPAN_VERSION undef
CPAN_FILEContact Author mod_perl book (Doug and
Lincoln) [EMAIL PROTECTED]
DSLI_STATUS  bdpf (beta,developer,perl,functions)
INST_FILE(not installed)




_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: [ANNOUNCE] new site: scaling mod_perl (+tool: mod_perl + DBD::Oracle)

2000-12-08 Thread Wilt, Paul

Please do make it available.  The more examples the better.

Paul E Wilt 
Principal Software Engineer

XanEdu, Inc. ( a division of Bell+Howell InformationLearning)
http://www.XanEdu.com
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
300 North Zeeb Rd   Phone: (734) 975-6021  (800)
521-0600 x6021
Ann Arbor, MI 48106 Fax:(734) 973-0737




-Original Message-
From: Matt Sergeant [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08,2000 12:54 PM
To: Perrin Harkins
Cc: Ed Park; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [ANNOUNCE] new site: scaling mod_perl (+tool: mod_perl +
DBD::Oracle)


On Fri, 8 Dec 2000, Perrin Harkins wrote:

  1. Performance benchmarking code. In particular, I'm looking for tools
 that
  can read in an apache log, play it back realtime (by looking at the time
  between requests in the apache log), and simulate slow  simultaneous
  connections. I've started writing my own, but it would be cool if
 something
  else out there existed.

 The mod_backhand project was developing a tool like this called Daquiri.

I also have a tool here that you install as a TransHandler, and it reads
querystring and POST data [*] and saves it to an XML log file, then it
appends to the PerlHandler phase and dumps the output that would go to the
browser to the same XML log file (of course this requires the output to
be stored somewhere, like Apache::Filter does, rather than printed direct
to the browser). Then there's a little playback tool. Its a bit specific
to the app I'm working on, because there's code in place to make
Apache::Request a singleton and also collect the output, but I could be
persuaded to open it up to people.

[*] using Apache::Request at the moment - but we need to modify
Apache::Request to be a singleton as it can't be instantiated twice in the
same application at the moment.

-- 
Matt/

/||** Director and CTO **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** Personal Web Site: http://sergeant.org/ **
 \\//
 //\\
//  \\


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: perl's memory leak

2000-12-08 Thread Stas Bekman

On Fri, 8 Dec 2000, mark warren bracher wrote:

 it seems as if most (if not all) the techniques for checking the size of 
 the current process are _very_ platform specific.  on linux you can use
 
Apache::SizeLimit::linux_size_check

If you have linux you have (or can have GTop), which gives you an API to
do this and many other things. Apache::SizeLimit::linux_size_check is just
a custom function that you cannot really re-use (unless you put it into
some other module...

 
 which is just parsing /proc/self/status.
 
 - mark
 
 Stas Bekman wrote:
 
  On Thu, 7 Dec 2000 [EMAIL PROTECTED] wrote:
  
  
  The output I get is 
  
  used memory = 0
  used memory = 0
  used memory = 0
  used memory = 0
  used memory = 0
  
  
  I get the same under perl 5.6.0 on linux, looks like BSD::Resource doesn't
  work there :( Anyone?
  
  Use gtop instead (if you have it):
use GTop ();
print GTop-new-proc_mem($$)-size,"\n";
 [snip]
 
 



_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: debuggers

2000-12-08 Thread Bruce W. Hoylman

 "Matt" == Matt Sergeant [EMAIL PROTECTED] writes:

Matt On Fri, 8 Dec 2000, Bruce W. Hoylman wrote:

 use IO::File;
 use CGI::Carp qw(carpout fatalsToBrowser carp);
Matt Bye bye exception handling.

You mean eval{} block exception handling, or something else?  What are
the technical specifics around this assertion?

Thanks!  Maybe I'll learn something here, which is why I posted it in
the first place.

Peace.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: [ANNOUNCE] new site: scaling mod_perl will be movin to the Guide

2000-12-08 Thread Ed Park

I've gotten in touch with Stas, and the 'scaling mod_perl' site will
eventually be folded into the Guide. woohoo!

I'm going to spend several weeks fleshing it out and cleaning it up before
it goes in, though.

-Ed

-Original Message-
From: Perrin Harkins [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 12:36 PM
To: Ed Park; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [ANNOUNCE] new site: scaling mod_perl (+tool: mod_perl +
DBD::Oracle)


 The enterprise mod_perl architectures idea that I posted earlier has
evolved
 into a slightly modified idea: a 'scaling mod_perl' site:
 http://www.lifespree.com/modperl.

 The point of this site will be to talk about  synthesize techniques for
 scaling, monitoring, and profiling large, complicated mod_perl
 architectures.

No offense, but the content you have here looks really well suited to be
part of the Guide.  It would fit nicely into the performance section.
Making it a separate site kind of fragments the documentation.

 So far, I've written up a basic scaling framework, and I've posted a
 particular development profiling tool that we wrote to capture, time, and
 explain all SQL select queries that occur on a particular page of a
mod_perl
 + DBD::Oracle application:
 -http://www.lifespree.com/modperl/explain_dbitracelog.pl
 -http://www.lifespree.com/modperl/DBD-Oracle-1.06-perfhack.tar.gz

Take a look at DBIx::Profile as well.

 1. Performance benchmarking code. In particular, I'm looking for tools
that
 can read in an apache log, play it back realtime (by looking at the time
 between requests in the apache log), and simulate slow  simultaneous
 connections. I've started writing my own, but it would be cool if
something
 else out there existed.

The mod_backhand project was developing a tool like this called Daquiri.

 If folks could just send me pointers to various caching
 modules and code, I'll test them in a uniform environment and let folks
know
 what I come up with.

There are a bunch of discussions about this in the archives, including one
this week.  Joshua Chamas did some benchmarking on a dbm-based approach
recently.

- Perrin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: perl's memory leak

2000-12-08 Thread Perrin Harkins

On Fri, 8 Dec 2000, Stas Bekman wrote:
 If you have linux you have (or can have GTop), which gives you an API to
 do this and many other things. Apache::SizeLimit::linux_size_check is just
 a custom function that you cannot really re-use (unless you put it into
 some other module...

Unfortunately, GTop is kind of a pain to compile.  It seems to depend on
some Gnome stuff.  We use Apache::SizeLimit for this reason, and it works
well.

- Perrin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [ANNOUNCE] new site: scaling mod_perl (+tool: mod_perl + DBD::Oracle)

2000-12-08 Thread Perrin Harkins

 The enterprise mod_perl architectures idea that I posted earlier has
evolved
 into a slightly modified idea: a 'scaling mod_perl' site:
 http://www.lifespree.com/modperl.

 The point of this site will be to talk about  synthesize techniques for
 scaling, monitoring, and profiling large, complicated mod_perl
 architectures.

No offense, but the content you have here looks really well suited to be
part of the Guide.  It would fit nicely into the performance section.
Making it a separate site kind of fragments the documentation.

 So far, I've written up a basic scaling framework, and I've posted a
 particular development profiling tool that we wrote to capture, time, and
 explain all SQL select queries that occur on a particular page of a
mod_perl
 + DBD::Oracle application:
 -http://www.lifespree.com/modperl/explain_dbitracelog.pl
 -http://www.lifespree.com/modperl/DBD-Oracle-1.06-perfhack.tar.gz

Take a look at DBIx::Profile as well.

 1. Performance benchmarking code. In particular, I'm looking for tools
that
 can read in an apache log, play it back realtime (by looking at the time
 between requests in the apache log), and simulate slow  simultaneous
 connections. I've started writing my own, but it would be cool if
something
 else out there existed.

The mod_backhand project was developing a tool like this called Daquiri.

 If folks could just send me pointers to various caching
 modules and code, I'll test them in a uniform environment and let folks
know
 what I come up with.

There are a bunch of discussions about this in the archives, including one
this week.  Joshua Chamas did some benchmarking on a dbm-based approach
recently.

- Perrin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: debuggers

2000-12-08 Thread Dave Rolsky

On Fri, 8 Dec 2000, Matt Sergeant wrote:

 fatalsToBrowser installs a $SIG{__DIE__} handler, and so prevents you from
 properly using eval{} blocks, or nice modules like Error.pm or
 Class::Exception (or whichever way around Dave has it this week :-)

That's Exception::Class.  phhhbbtt!


-dave

/*==
www.urth.org
We await the New Sun
==*/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: mod_perl IPC under Solaris 7

2000-12-08 Thread Steven Cotton

On Fri, 8 Dec 2000, Mark Doyle wrote:

 I suppose the first place to look is to use the Solaris
 commands ipcs and ipcrm... Also, I believe you have to
 update the kernerl parameters for shared memory. The default
 is pretty skimpy. Look at adding things like:
 
 to /etc/system.

Yes, I have made some changes there. I have:

set shmsys:shminfo_shmmax = 8388608
set shmsys:shminfo_shmmni = 10240
set shmsys:shminfo_shmseg = 512

The man page for shmget says that for ENOSPC a shared memory identifier is
to be created but the system imposed limit on the maximum number of
allowed identifiers would be exceeded. I have set shmmni to 102400 and had
the same error. Can I actually see how many identifiers I have at one
time, and which processes are creating them?

Thanks,

-- 
steven


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: mod_perl advocacy project resurrection

2000-12-08 Thread Matt Sergeant

On Fri, 8 Dec 2000, Stas Bekman wrote:

 The real question is for someone to undertake the Safe module and make it
 working for mod_perl. I think we have discussed this before. I don't
 remember what was the conclusion.

That its pretty hard to do, and requires Safe holes to be any use for
anything serious. Although someone had DBI working through Safe that
emailed me, but I've since discarded or lost that email.

FWIW, I still have Apache::Safe hanging around here somewhere. Not that
its any use though :-)

-- 
Matt/

/||** Director and CTO **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** Personal Web Site: http://sergeant.org/ **
 \\//
 //\\
//  \\


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [me too] certification [Was: mod_perl advocacy project resurrection]

2000-12-08 Thread Matt Sergeant

On Fri, 8 Dec 2000, Paul wrote:

 I would love to be able to list on my resumé that I was Perl and
 mod_perl certified. How about publicity in the form of a page listing
 certified Perl/modPerl coders on take23, with contact info if they
 like? Great for getting those job offers.

We will be doing jobs and resumes on there when I get some tuits to do a
bit more coding on the site, maybe over xmas. What I'd love to be able to
provide is some sort of auto-matcher for employers/employees, but thats
way up there right now.

-- 
Matt/

/||** Director and CTO **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** Personal Web Site: http://sergeant.org/ **
 \\//
 //\\
//  \\


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




[me too] certification [Was: mod_perl advocacy project resurrection]

2000-12-08 Thread Paul

First, the gratuitous "me, too!"
As fair warning, there's little more than that in terms of valid
content here, but if you're still interested in reading the rest

--- "J. J. Horner" [EMAIL PROTECTED] wrote:
 On Wed, Dec 06, 2000 at 01:22:26PM -0800, Randal L. Schwartz wrote:
   "Gunther" == Gunther Birznieks [EMAIL PROTECTED] writes:
  Gunther This is exactly why someone experienced in training (ie
  Gunther Randal/StoneHenge) would hopefully be the ones to take the
  Gunther torch on this. If there's anyone I would trust a
  Gunther certification from, it would be them.
  
  We've considered the certification route from time to time, but
  other than being a money maker for us (which isn't all that bad
  of a deal :-),
  I'm still not entirely convinced that the community of *ours*
  would demand certification in any distinguishing way.
  
  I mean, until I can demonstrate that people with certs are likely
  to get hired faster or make more money, what's the point?  As it is
  now, good mod_perl people are hard enough to find that the
jobseeker
  already has the advantage.
  
  I'm very open to being convinced otherwise though.
  
 
 I'd be interested in something like this.  For a low price
 ($50-$100),

I would do that. In fact, I would probably pay more.

 I'd take a list of activities from your website, complete the
 activities, submit my code back to you, and let you grade me,
 and then send me some form of certificate saying
 "Certified mod_perl hacker" with Stonehenge and the famous
 merlyn signing it.

I'd be a little less eager about the sort of simple multiple choice
that would be easiest to automate, but even that would suffice.

 If we could get Doug and Lincoln to sign off on the list of
 activities,  the certification couldn't get more genuine than that.

Agreed.

[snip]
 How many technologies have the actual creator as part of the
 certification process?  It could only help.

I don't know about "only", but I second the sentiment.

I would love to be able to list on my resumé that I was Perl and
mod_perl certified. How about publicity in the form of a page listing
certified Perl/modPerl coders on take23, with contact info if they
like? Great for getting those job offers.


__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: mod_perl advocacy project resurrection

2000-12-08 Thread Keith G. Murphy

Stas Bekman wrote:
 
 Let me stright things out a bit, so you won't get misleaded by my post as
 a marketing call.
 
 What we want is very simple.
 
 1. We want many users, so they will thoroughly test the software and spot
 bugs asap, so we -- current users will get a better product.
 
 2. We want more developers, so they will write core mod_perl and 3rd party
 modules, again for us current users to re-use and save development
 time. 
[cut]

It strikes me that there might be a route not yet taken to increase
*availability* of mod_perl.

Think about all the ISPs that host personal and small business web
sites.  How many of them run Apache and allow their customers to code
Perl scripts?

Earthlink (which is huge), for one.  Yet it doesn't have mod_perl
installed.  But if it did, both Earthlink itself and the customers might
see performance benefits from Apache::Registry scripting.

The two biggest obstacles I see to this:

(1) Have to have a *reliable* way for customers to reload their Registry
scripts.  Here's where some development work might be needed.

(2) It might be argued that anything that *needs* Registry is too
heavy-duty for the ISP to want it running anyway.

Thoughts?

(I wonder if it might be possible to enlist the Apache folks to campaign
for this as well, since anything that keeps out the dread IIS is
desirable).

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [me too] certification [Was: mod_perl advocacy project resurrection]

2000-12-08 Thread Jay Jacobs



  On Wed, Dec 06, 2000 at 01:22:26PM -0800, Randal L. Schwartz wrote:
   
   I mean, until I can demonstrate that people with certs are likely
   to get hired faster or make more money, what's the point?  As it is
   now, good mod_perl people are hard enough to find that the
   jobseeker already has the advantage.

"The jobseeker already has the advantage" is the key phrase.  I think the
general idea is to balance that out and broaden both the job market for
mod_perl folks, and the talent pool of mod_perl programmers.  At this
point, IMO certification is the end of the line, the destination.  What we
need is a path to the destination.  We want to generate enough interest
and (dare I say) marketability of mod_perl to warrant certification.  
Articles are helpful, but when was the last time you saw a corporate
big-wig reading TPJ or Perl Month?  I'm sure it happens, but what about
getting an article in the big trade rags?  Slipping something in
Ziff-Davis rags, the things that sit on their desk and coffee tables...

  I'd take a list of activities from your website, complete the
  activities, submit my code back to you, and let you grade me,

snip

Copy and paste works wonders in the web.  You'd need heavy code-commenting
or a detailed explanation from the person (preferably in person) of the
code they "wrote".  It's the right path, just need to prepare for the
lowest common denomenator.

 I'd be a little less eager about the sort of simple multiple choice
 that would be easiest to automate, but even that would suffice.

Or a good combination thereof.

 I would love to be able to list on my resumé that I was Perl and
 mod_perl certified. How about publicity in the form of a page listing
 certified Perl/modPerl coders on take23, with contact info if they
 like? Great for getting those job offers.

From an employer's standpoint, that's an awful statement to read.  If I
hire a certified perl/mod_perl person, I'd like to believe that they're
with my company, and not reviewing other job offers continually, if
the site could evolve to "available certified folks"... that would
be a much better solution.  See point #1 above.

Jay Jacobs


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Concurrenty access to a log file!!!

2000-12-08 Thread Jerrad Pierce

If you use Apache's logging facilities (say for level debug). Apache will
handle the concurrency/serializing for you.

You might also look at using syslog

-Original Message-
From: Edmar Edilton da Silva [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 2:46 PM
To: [EMAIL PROTECTED]
Subject: Concurrenty access to a log file!!!


Hi all,

I have installed on my machine the mod_perl module and 
exists a lots
perl scripts running under mod_perl. I am doing some tests and I need
that all call to these perl scripts write in a log file. How can there
are a lots scripts running to the same time, I need to control the
processes of write. Please, can anyone give me any hint about it? Is
there any doc on the Internet that I can use? Thanks for all help...


Edmar Edilton da Silva
Bacharel em Ciência da Computacão - UFV
  Mestrando em Ciência da Computacão - UNICAMP





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Concurrenty access to a log file!!!

2000-12-08 Thread Stas Bekman

On Fri, 8 Dec 2000, Edmar Edilton da Silva wrote:

 Hi all,
 
 I have installed on my machine the mod_perl module and exists a lots
 perl scripts running under mod_perl. I am doing some tests and I need
 that all call to these perl scripts write in a log file. How can there
 are a lots scripts running to the same time, I need to control the
 processes of write. Please, can anyone give me any hint about it? Is
 there any doc on the Internet that I can use? Thanks for all help...

http://perl.apache.org/guide/debug.html#Critical_Section


_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




[JOB] mod_perl folks wanted in Boston - athenahealth.com

2000-12-08 Thread Ed Park

In the spirit of all of this talk about certification, demand for mod_perl
programmers, etc., I'd just like to say that I'm looking for programmers.

More to the point, I'm looking for kickass folks who just happen to know
mod_perl. If you know mod_perl very well, great, but generally speaking, I'm
looking for folks who are just kickass hackers, know that they are kickass
hackers, and are willing to do anything to drive a problem to extinction.

Experience with mod_perl, Linux, Oracle, Solaris, Java, XML/SOAP, MQ Series,
transaction brokers, systems administration, NT, DHTML, JavaScript, etc.
etc. are all Good Things. But basically, we're looking for folks who are
itching to prove themselves and have some sort of history that indicates
that they can do it.

As a backdrop: we just raised $30 million, and we were the top story in the
latest Red Herring VC Dealflow.
http://www.redherring.com/vc/2000/1206/vc-ltr-dealflow120600.html
As you have probably gathered by now from my posts about the Scaling
mod_perl page (http://www.lifespree.com/modperl/- soon to be folded into the
Guide), I'm currently starting up a scaling mod_perl project, and I have a
lot of money and stock options to burn on good people and interesting toys.

If you're interested, send me a private email  a resume and we'll talk.

Unfortunately, you sort of have to be in the Boston area (or willing to
move) to make this work.

cheers,
Ed


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Concurrenty access to a log file!!!

2000-12-08 Thread Edmar Edilton da Silva

Hi all,

I have installed on my machine the mod_perl module and exists a lots
perl scripts running under mod_perl. I am doing some tests and I need
that all call to these perl scripts write in a log file. How can there
are a lots scripts running to the same time, I need to control the
processes of write. Please, can anyone give me any hint about it? Is
there any doc on the Internet that I can use? Thanks for all help...


Edmar Edilton da Silva
Bacharel em Ciência da Computacão - UFV
  Mestrando em Ciência da Computacão - UNICAMP






Re: Concurrenty access to a log file!!!

2000-12-08 Thread Marc Spitzer

I don't know if this helps but when you log something add the process ID to
the log message.  Then you should be able to trace what process is running
what, look at :
http://httpd.apache.org/docs/mod/mod_log_config.html#formats
to tell you how to set up custom log formats, %p gives you the pid, there
are some other things that could be useful to you as well.  And just use
Apache's standard logging.

marc

- Original Message -
From: Edmar Edilton da Silva [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, 8. December 2000 14:46
Subject: Concurrenty access to a log file!!!


 Hi all,

 I have installed on my machine the mod_perl module and exists a lots
 perl scripts running under mod_perl. I am doing some tests and I need
 that all call to these perl scripts write in a log file. How can there
 are a lots scripts running to the same time, I need to control the
 processes of write. Please, can anyone give me any hint about it? Is
 there any doc on the Internet that I can use? Thanks for all help...

 
 Edmar Edilton da Silva
 Bacharel em Ciência da Computacão - UFV
   Mestrando em Ciência da Computacão - UNICAMP
 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




ssl

2000-12-08 Thread cbell

Hi everyone, does anyone have any suggestions as to which SSL package to
use?  I'm a little unsure if I should use Mod_ssl or Apache-ssl.  I'm
currently using Apache 1.3.12 if that helps...

Thanks alot!!!


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




STDERR

2000-12-08 Thread Aleksandr Vladimirskiy

Hi, 

I am writing a module that launches a perl script. I would like the user
to see the error cenerated by the script in the browser. So far I either
get the errors sent to the apache error_log or the browser respons that
the document contained no data. Please help!

Alex

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: STDERR

2000-12-08 Thread Jerrad Pierce

dup STDOUT to STDERR

-Original Message-
From: Aleksandr Vladimirskiy [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 5:16 PM
To: [EMAIL PROTECTED]
Subject: STDERR


Hi, 

I am writing a module that launches a perl script. I would 
like the user
to see the error cenerated by the script in the browser. So 
far I either
get the errors sent to the apache error_log or the browser respons that
the document contained no data. Please help!

Alex

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: STDERR

2000-12-08 Thread Aleksandr Vladimirskiy

That would have the opposite effect of what I want. I want the errors to
go to the browser not the output of the script to the error_log. ???

Alex

Jerrad Pierce wrote:
 
 dup STDOUT to STDERR
 
 -Original Message-
 From: Aleksandr Vladimirskiy [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 08, 2000 5:16 PM
 To: [EMAIL PROTECTED]
 Subject: STDERR
 
 
 Hi,
 
 I am writing a module that launches a perl script. I would
 like the user
 to see the error cenerated by the script in the browser. So
 far I either
 get the errors sent to the apache error_log or the browser respons that
 the document contained no data. Please help!
 
 Alex
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Concurrenty access to a log file!!!

2000-12-08 Thread Stas Bekman

On Fri, 8 Dec 2000, Jerrad Pierce wrote:

 If you use Apache's logging facilities (say for level debug). Apache will
 handle the concurrency/serializing for you.

If I remember correctly only if the size of a single
warn/print(STDERR,...)  4k, if you are talking about manually logging
thru STDERR.



_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Concurrenty access to a log file!!!

2000-12-08 Thread Jerrad Pierce

There's not Apache::: API for hooking into logging?

AFAIK (which isn't to say much) it seems children pass logging information
back to the
initial process in some queue, et voila?

And that 4k when likely be dependent on the kernel filehandle buffer.
Which yes, is 4k on your typical x86...
-Original Message-
From: Stas Bekman [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 3:51 PM
To: Jerrad Pierce
Cc: mod_perl list
Subject: RE: Concurrenty access to a log file!!!


On Fri, 8 Dec 2000, Jerrad Pierce wrote:

 If you use Apache's logging facilities (say for level 
debug). Apache will
 handle the concurrency/serializing for you.

If I remember correctly only if the size of a single
warn/print(STDERR,...)  4k, if you are talking about manually logging
thru STDERR.



_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: STDERR

2000-12-08 Thread Aleksandr Vladimirskiy

I am sorry, its just my question wasn't on how to do it ("dup STDERR to
STDOUT"), but rather why doing that doesn't work. I have two pieces to
the puzzle an apache module and an external script. I get the errors
from the external script in the error_log, so I redirect them in the
module or the script to STDOUT, but this fails which means that apache
doesn't have a STDOUT or its something else.

Alex

Jerrad Pierce wrote:
 
 so reverse it. Sheesh.
 
 -Original Message-
 From: Aleksandr Vladimirskiy [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 08, 2000 5:33 PM
 To: Jerrad Pierce; [EMAIL PROTECTED]
 Subject: Re: STDERR
 
 
 That would have the opposite effect of what I want. I want the
 errors to
 go to the browser not the output of the script to the error_log. ???
 
 Alex
 
 Jerrad Pierce wrote:
 
  dup STDOUT to STDERR
 
  -Original Message-
  From: Aleksandr Vladimirskiy [mailto:[EMAIL PROTECTED]]
  Sent: Friday, December 08, 2000 5:16 PM
  To: [EMAIL PROTECTED]
  Subject: STDERR
  
  
  Hi,
  
  I am writing a module that launches a perl script. I would
  like the user
  to see the error cenerated by the script in the browser. So
  far I either
  get the errors sent to the apache error_log or the browser
 respons that
  the document contained no data. Please help!
  
  Alex
  
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: STDERR

2000-12-08 Thread Stas Bekman

On Fri, 8 Dec 2000, Aleksandr Vladimirskiy wrote:

 I am sorry, its just my question wasn't on how to do it ("dup STDERR to
 STDOUT"), but rather why doing that doesn't work. I have two pieces to
 the puzzle an apache module and an external script. I get the errors
 from the external script in the error_log, so I redirect them in the
 module or the script to STDOUT, but this fails which means that apache
 doesn't have a STDOUT or its something else.

http://perl.apache.org/guide/porting.html#STDIN_STDOUT_and_STDERR_streams

 
 Alex
 
 Jerrad Pierce wrote:
  
  so reverse it. Sheesh.
  
  -Original Message-
  From: Aleksandr Vladimirskiy [mailto:[EMAIL PROTECTED]]
  Sent: Friday, December 08, 2000 5:33 PM
  To: Jerrad Pierce; [EMAIL PROTECTED]
  Subject: Re: STDERR
  
  
  That would have the opposite effect of what I want. I want the
  errors to
  go to the browser not the output of the script to the error_log. ???
  
  Alex
  
  Jerrad Pierce wrote:
  
   dup STDOUT to STDERR
  
   -Original Message-
   From: Aleksandr Vladimirskiy [mailto:[EMAIL PROTECTED]]
   Sent: Friday, December 08, 2000 5:16 PM
   To: [EMAIL PROTECTED]
   Subject: STDERR
   
   
   Hi,
   
   I am writing a module that launches a perl script. I would
   like the user
   to see the error cenerated by the script in the browser. So
   far I either
   get the errors sent to the apache error_log or the browser
  respons that
   the document contained no data. Please help!
   
   Alex
   
  
  -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: STDERR

2000-12-08 Thread Doug Brewer

here's my variation on your question (sorry, not much help to you):

while you are in a handler and you catch an error, why can't you then $r-print
the error message, and return OK immediately?

Perl just dies and Apache returns the header when I try this.

Doug

| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
|
|
| Hi,
|
| I am writing a module that launches a perl script. I would like the user
| to see the error cenerated by the script in the browser. So far I either
| get the errors sent to the apache error_log or the browser respons that
| the document contained no data. Please help!
|
| Alex
|
| -
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
|


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: mod_perl advocacy project resurrection

2000-12-08 Thread Ask Bjoern Hansen

On Tue, 5 Dec 2000, brian moseley wrote:

[...]
 consider a scenario in which somebody uses a web interface
 to signal an action, which is placed into a message queue.
 on the other end of that queue, a service handles the event
 with a transaction that spans multiple third tier systems.
 
 this is the kind of architecture that is begging to be
 embraced by perl.

Talarian have a Perl API for SmartSockets. I would think they have
for their "SmartMQ" thingy too. If not then it's probably easy to
make.

http://www.talarian.com/products/smartsockets/
http://www.talarian.com/products/smartmq/ 


 - ask

-- 
ask bjoern hansen - http://ask.netcetera.dk/
more than 70M impressions per day, http://valueclick.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




STDERR

2000-12-08 Thread Aleksandr Vladimirskiy

Well I looked at the link on perl.apache.org
(http://perl.apache.org/guide/porting.html#STDIN_STDOUT_and_STDERR_streams),
and it still isn't working. I must be coding wrong. Please take a look
at the code:

$r-content_type('text/html');

$r-send_http_header;

open (STDERR, "STDOUT");

tie *OUT, 'Apache';

$r-print("htmlbody");

$status = system("some.prog.pl", $params{'...'}, $params{'...'});

$r-print("/body/html");

thanks very much

Alex

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




STDERR

2000-12-08 Thread Aleksandr Vladimirskiy

Hey I got it. The code was wrong. So now I do an "open (STDERR,
"STDOUT");" in the beginning of the external script and a "tie *OUT,
'Apache';" in the module, then I used backtick to execute so now it
dumps everything to browser. Really sweet!

Thanks

Alex

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Persistent objects between init and content handlers

2000-12-08 Thread Perrin Harkins

On Fri, 8 Dec 2000, Doran L. Barton wrote:
 I've got information stored in a DBI-accessible database. I would like to
 read this information from the database and populate an object with the
 data (really just a tree of hashes). This database "dump" into the object
 should occur at child-init (so, I'm guessing with a PerlChildInitHandler 
 directive). Then, I need to use the object functions/methods to navigate 
 the data in a content handler.
 
 I tried passing the object using $r-notes(), but it didn't work. Then I
 read somewhere the data in $r-notes() is destroyed after each request- so
 of course that isn't going to work. 

Just put it in a global.

$Cached::Data::Thingy = $my_object;

- Perrin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Persistent objects between init and content handlers

2000-12-08 Thread Doran L. Barton

Okay- Maybe I'm trying too hard here, but, if so, I'd appreciate a slap in
the face. Here's the project:

I've got information stored in a DBI-accessible database. I would like to
read this information from the database and populate an object with the
data (really just a tree of hashes). This database "dump" into the object
should occur at child-init (so, I'm guessing with a PerlChildInitHandler 
directive). Then, I need to use the object functions/methods to navigate 
the data in a content handler.

I tried passing the object using $r-notes(), but it didn't work. Then I
read somewhere the data in $r-notes() is destroyed after each request- so
of course that isn't going to work. 

Essentially, I need to make this object persistent across requests in much
the same way Apache::DBI makes database connection handles persistent
across requests. 

Can I make a variable scoped local to the child? Weird, huh?

Thanks in advance for your attention to this issue.

-- 
Doran L. Barton [EMAIL PROTECTED] - Chief Super Hero - Iodynamics LLC 
 http://www.iodynamics.com/  - Linux solutions and dynamic websites
 "A good messenger expects to get shot." --- Larry Wall 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: STDERR

2000-12-08 Thread Stas Bekman

On Fri, 8 Dec 2000, Aleksandr Vladimirskiy wrote:

 Well I looked at the link on perl.apache.org
 (http://perl.apache.org/guide/porting.html#STDIN_STDOUT_and_STDERR_streams),
 and it still isn't working. I must be coding wrong. Please take a look
 at the code:
 
 $r-content_type('text/html');
 
 $r-send_http_header;
 
 open (STDERR, "STDOUT");
 
 tie *OUT, 'Apache';
 
 $r-print("htmlbody");
 
 $status = system("some.prog.pl", $params{'...'}, $params{'...'});
 
 $r-print("/body/html");
 
 thanks very much

Hmm, first OUT filehandler was just an example, I don't understand why did
you copy it.

Second what you probably have to do is this:

some.prog.pl:
-
open (STDERR, "STDOUT") or die "Cannot dup STDOUT: $!";
...
the rest of the code
...


the main code:
--
$r-content_type('text/html');
$r-send_http_header;
print("htmlbody");
print `some.prog.pl foo bar`; # back ticks return the output
print("thanks very much :)");
print("/body/html");


I didn't test it, but that's more or less that you should do...


_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: STDERR

2000-12-08 Thread Stas Bekman

On Fri, 8 Dec 2000, Aleksandr Vladimirskiy wrote:

 Hey I got it. The code was wrong. So now I do an "open (STDERR,
 "STDOUT");" in the beginning of the external script and a "tie *OUT,
 'Apache';" in the module, then I used backtick to execute so now it
 dumps everything to browser. Really sweet!

it's just that you don't need the "tie *OUT,'Apache';" part unless you try
to win an obscure code contest :)


_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: [certification]

2000-12-08 Thread Gunther Birznieks

At 09:39 AM 12/8/00 -0600, Hill, David T - Belo Corporate wrote:


-Original Message-
From: Gunther Birznieks [mailto:[EMAIL PROTECTED]]

"Obviously they still have to be technically interviewed, but in lieu of
someone with or without certification, it's easier to short-list on the
basis of such certification (or some equivalent outstanding thing such as
contributing to CPAN)."

 If you are 'short-listing' based on certification, you may be
 missing your best candidates...

Whatever. You missed my point entirely and took my posts on this subject 
out of context.

The point is about probability and statistics. There is no way when a 
hiring manager gets 100 CVs that they can look through them all with a fine 
tooth comb especially when geeks tend to SUCK at writing CVs (eg 80% seem 
to feel that they have to write a 20 pages that say nothing but pisses off 
the reader).

Also, I didn't say certs are the only way to short-list. So are advanced 
degrees (not necessarily CS), someone who has written tutorials, someone 
who has contributed to open source (eg says on their CV they have modules 
on CPAN), etc.

Certs are ONE distinguishing factor.

OK, tell you what. I guess the next time I put an ad in the paper, I'll 
just tell people to send me just their name and phone number so I can set 
up an interview.

Because according to this sentiment, if I pay attention to distinguishing 
factors on their CV then I might be missing some of my best candidates if I 
do so, so I might as well interview 'em all!

BZZT!

Wrong answer. Screw that. It doesn't work that way. There is limited time 
in this world to call people in for interviews. If anyone thinks 
distinguishing factors should not affect the way a hiring manager reads a 
CV has their head in a cloud.

Anyway, I apologize for giving harsh example -- but it seems that there's 
no other way to demonstrate this. The fact is that certs help and certs are 
important. But the degree to which they are important is another issue 
entirely.

And I concede that it may be too early for certs being necessary for 
mod_perl itself because it's not reached an adequate critical mass as 
pointed out earlier.

However, the fact is that their can be other distinguishing factors on a 
CV, but to ignore those factors INCLUDING certs is just stupid unless you 
have the luxury of only having some ridiculously low number of CVs to look 
at and can spend that time interviewing people because you only have a few 
straws to grasp.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Persistent objects between init and content handlers

2000-12-08 Thread Ajit Deshpande

On Fri, Dec 08, 2000 at 03:33:32PM -0800, Perrin Harkins wrote:
 On Fri, 8 Dec 2000, Doran L. Barton wrote:
  I've got information stored in a DBI-accessible database. I would like to
  read this information from the database and populate an object with the
  data (really just a tree of hashes). This database "dump" into the object
  should occur at child-init (so, I'm guessing with a PerlChildInitHandler 
  directive). Then, I need to use the object functions/methods to navigate 
  the data in a content handler.
  
  I tried passing the object using $r-notes(), but it didn't work. Then I
  read somewhere the data in $r-notes() is destroyed after each request- so
  of course that isn't going to work. 
 
 Just put it in a global.
 
 $Cached::Data::Thingy = $my_object;

If $my_object does not need to be different for different child httpds,
then simply put it in the parent httpd. Or better still use
Apache::Session (since you already have a neat DBI-accessible database
setup). From the perldoc of Apache::Session :

use strict;

my %global_data;

eval {
tie %global_data, 'Apache::Session::File', 1,
   {Directory = '/tmp/sessiondata'};
};
if ($@) {
   die "Global data is not accessible: $@";
}

my $dbh = DBI-connect($global_data{datasource},
   $global_data{username}, $global_data{password}) || die $DBI::errstr;

undef %global_data;

Of course, you can use Apache::Session::[MySQL|Oracle||DBI-d/b] instead
of Apache::Session::File.

Ajit

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




custom directives done using filters

2000-12-08 Thread Robin Berjon

Hi,

I feel bad insisting because I know most of you are probably at least as
busy as I am. I posted a message a few days ago
(http://www.geocrawler.com/lists/3/Web/182/200/4787953/) and didn't get a
single answer. I understand if you don't want to read it as it's fairly
long. Basically, I'm trying to some up with a way to implement custom
directives by applying Perl source filters in httpd.conf, but for some
reason it isn't working.

If any of you know anything that could help me find a way to make it work
(or give me a definitive answer that it simply can't be done) it'd be very
much appreciated.

Thanks,

-- robin b.
Heisenberg might have been here.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Apache::ASP problem with post data

2000-12-08 Thread Joshua Chamas

Luc Willems wrote:
 
 it seems that the "Content-type" must be
 "application/x-www-form-urlencoded" before we can get anything out of
 the content() routine from mod_perl :-(
 
 #Get posted XML query
 $len = $Request-{TotalBytes};
 $Request-{asp}-{r}-read($i,$len);
 

I'll change the Apache::ASP code to read() instead 
of content() just for this reason.  I might only
parse it for Form() if "application/x-www-form-urlencoded"
but at least it'll be there for BinaryRead()

Thanks for figuring this out.

--Josh

_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks  free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: custom directives done using filters

2000-12-08 Thread Jim Winstead

On Dec 09, Robin Berjon wrote:
 I feel bad insisting because I know most of you are probably at least as
 busy as I am. I posted a message a few days ago
 (http://www.geocrawler.com/lists/3/Web/182/200/4787953/) and didn't get a
 single answer. I understand if you don't want to read it as it's fairly
 long. Basically, I'm trying to some up with a way to implement custom
 directives by applying Perl source filters in httpd.conf, but for some
 reason it isn't working.

the configuration file is actually read and processed by apache,
so i don't see how perl source filters could be applied to it.

jim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: RFC: mod_perl advocacy project resurrection

2000-12-08 Thread Keith G. Murphy

Patrick wrote:
 
 On Thu, Dec 07, 2000 at 03:52:01PM +0100, Stas Bekman took time to write:
  Your problem is that you try to use the precompiled broken packages
  provided by distros.
 
 If I can jump... I must say that I *never* had a problem with Debian
 packages of mod_perl. Maybe RedHat packages have (don't known I don't
 use that), but Debian packages are correct for me.
 
 So on a Debian System, you just need to do :
 apt-get install libapache-mod-perl
 
 and tweak the configuration files.
 
 At least that's my experience.

Mmmm, I did have a big problem (segfaults) with the apache and mod_perl
from Debian 2.1.  I think it was an upstream, not package, problem
though: that was when most everybody was having a problem with mod_perl
as a module.

I built it into Apache though, and it worked fine.

Debian 2.2 has it built that way as a binary, so I've just gone with
that.  I've stayed away from the separate module thing, so I have no
idea how well it works now.

 (BTW, kudos the the Debian maintainer which probably reads this list)
 
Absolutely.  I've never seen a package problem.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]