Re: ApacheDBI question

2000-01-29 Thread Mark Cogan

At 05:40 PM 1/28/00 -0500, Deepak Gupta wrote:
>How does connection pooling determine how many connections to keep open?
>
>The reason I ask is that I am afraid my non-modperl scripts are getting
>rejected by the db server b/c all (or most) connections are being
>dedicated to Apache activity.

Apache::DBI keeps one connection open per process per unique connection 
string. If you have 175 modperl processes running, be prepared to cope with 
as many as 175 database connections.

The source code for Apache::DBI is worth a look -- it's very short and easy 
to understand, and then you'll know all there is to know about how it works.
-------
Mark Cogan[EMAIL PROTECTED] +1-520-881-8101 
ArtToday  www.arttoday.com



Re: Seeking volunteer to providing mailing list summaries

1999-11-12 Thread Mark Cogan

At 05:09 PM 11/10/99 -0700, Tom Christiansen wrote:
>While I've got your attention, I'm also looking for some highly-talented
>web programmers to help out on implementing some ideas to create dynamic
>content for the Perl website and for CPAN.  

Ok, I think I fall into this category. I'm interested in helping; can you
give me more information? 
---
Mark Cogan[EMAIL PROTECTED] 
Director of Engineering +1 520-881-8101
ArtToday   www.arttoday.com



RE: Trying not to re-invent the wheel

1999-11-12 Thread Mark Cogan

At 10:10 AM 11/10/99 -0800, Ian Mahuron wrote:
>
>As per someone's suggestion I'll ellaborate on what's in the HTML...
>
>Insert code for advertisment (there's 1,000's of different ads on the
>site.):
>
>
>Insert news scroller:
>
>
>There will be at least 50 similar tags.. so I'm not parsing for just a
>couple of tags like HTML::Template..

Ok, so you aren't really parsing the HTML at all, just looking for custom
tags in it? In that case, just use s///. 

>I may implement IF/LOOPS/etc.. but not until I see the need.

Those introduce more complex problems.

>I've written up a few test benches for HTML::Parser.. it works ok, but it's
>not as fast as I would like it to be.

IS there some reason you don't just use HTML::Mason?
---
Mark Cogan[EMAIL PROTECTED] 
Director of Engineering +1 520-881-8101
ArtToday   www.arttoday.com



Re: PerlTransHandler

1999-10-20 Thread Mark Cogan

At 10:03 AM 10/19/99 -0700, William Deegan wrote:
>Eric Cholet wrote:
>> 
>> On Tuesday, October 19, 1999 4:13 AM, William Deegan
[SMTP:[EMAIL PROTECTED]] wrote:
>> > How can I change the environment variables that get passed to a perl
>> > script running under Apache::Registry from a PerlTransHandler?
>> >
>> > I'm using the PerlTransHandler to do a sort of dynamic mod_rewrite
>> > functionality.
>> 
>> Since you've got mod_perl on both sides, I'd suggest you don't use env
>> variables (which are expensive). Your Trans handler can just set
>> package variables which will be picked up by the registry script.
>> Alternatives are using $r->dir_config, or $r->notes.
>
>I'll look into that.  For now though all of our scripts are set
>up to check for an enviroment variable set for some virtual hosts,
>now we'd like a way to set these same variables using a
>PerlTransHandler.
>
>So how do I go about setting the enviroment variables.
>Assuming that I don't care about the cost.

Use the %ENV hash in perl. The environment is shared between the whole
request, so setting $ENV{whatever} in the PerlTransHandler will make it
visible to the content handler down the line. 
---
Mark Cogan[EMAIL PROTECTED] 
Director of Engineering +1 520-881-8101
ArtToday   www.arttoday.com



Re: httpd.conf problem.

1999-10-08 Thread Mark Cogan

At 04:25 PM 10/8/99 +0200, Terje Malmedal wrote:
>
>Hi,
>
>Inside a  section I want to configure mod_rewrite dynamically,
>this works:
>
>  $RewriteRule = "/cgi-bin/printenv  /cgi-bin/slave.pl [PT]";
>
>If I do this:
>
>  $RewriteRule = "/cgi-bin/printenv  /cgi-bin/slave.pl [PT]";
>  $RewriteRule = "/cgi-bin/test  /cgi-bin/slave.pl [PT]";
>
>the last RewriteRule will hide the first one. 
>
>The following attempts to not work at all: 
>  push(@RewriteRule , "/cgi-bin/printenv  /cgi-bin/slave.pl [PT]");
>  push(@RewriteRule , "/cgi-bin/printenv" , "/cgi-bin/slave.pl [PT]");
>  push(@RewriteRule , "/cgi-bin/printenv" , "/cgi-bin/slave.pl", "[PT]");
>  $RewriteRule{'/cgi-bin/printenv'} = "/cgi-bin/slave.pl [PT]";

Try:

push @RewriteRule, [qw(/cgi-bin/printenv /cgi-bin/slave.pl [PT])];

(Using an arrayref for the values of the rule.) 

(I have no idea if that will work or not, but that seems to be how things
like [Perl]SetEnv work.) 
---
Mark Cogan[EMAIL PROTECTED] 
Director of Engineering +1 520-881-8101
ArtToday   www.arttoday.com



Re: A few pointers, please.

1999-01-17 Thread Mark Cogan

At 01:45 PM 11/19/99 -0500, [EMAIL PROTECTED] wrote:
>From: Dave Pfaltzgraff@PATAPSCO on 11/19/99 01:45 PM
>
>I'm fairly new at this and need a few pointers to possible resources.
>
>I've used Apache::AuthenDBI and thus require the user to enter a user name
and
>password as expected. It all works. However, my customer has asked for
either a
>timeout, a [Logout] button, or both so that the browser basically
'forgets' the
>user id. This would then remove the requirement for the user to close down
the
>browser when they leave their system.
>
>Where can I look for assistence on this problem? My assumption is that it
would
>be a 'browser' thing so I wouldn't expect a direct answer from this group.

Exactly. The Basic Authentication scheme requires that the username and
password be sent with each request; most browsers store this information
after it has been entered once, and hang onto it until they are closed down. 

If you want to have a timeout or logout system, you need to implement some
kind of session-based authentication. 
---
Mark Cogan[EMAIL PROTECTED] +1-520-881-8101 
ArtToday  www.arttoday.com   perl.apache.solaris.oracle
"English is easy to learn -- all of the words are borrowed from C++"