unsubscribe modperl

2000-11-10 Thread Dr. Gerhard Johannsen

unsubscribe modperl



Re: pre-loaded modules on Solaris

2000-11-10 Thread barries

On Thu, Nov 09, 2000 at 04:24:31PM -0800, Bill Moseley wrote:
> And here's comparing the totals returned by the pmap program that should
> detail shared and private memory (according to the paper cited above).
> 
> Address   Kbytes Resident Shared Private
>   --  -- ---
> total Kb   24720   227203288   19432  <<< pre-loaded modules
> total Kb   14592   1297630969880  <<< not pre-loaed modules.
> 
> Indeed there's a tiny bit more shared memory in the pre-loaded Apache, but
> the amount of "private" memory is significantly higher, too.  Ten megs a
> child will add up.  It doesn't really make sense to me, but that's what
> pmap is showing.

Stupid question, probably, but when running the non-pre-loaded version,
are you sure all the same modules are being loaded?  I'm wondering if there's
some set of modules that, for some reason, isn't being loaded by the
sequence of requests you're firing against all of your httpds to
get the servers "warmed up" to represent real-life state.

- Barrie



Re: Building a ModPerl ISP for you!

2000-11-10 Thread barries

On Thu, Nov 09, 2000 at 10:12:10PM -0800, Joshua Chamas wrote:
> 
> It would likely begin with our first cluster built out in 
> California in the next year - year + 1/2, and grow on from 
> there.  Many thanks for your help.

Cool.  Best of luck.

> 1. How many dynamic web requests do you serve per month?
>  [ ] up to 10M pages
>  [x] 10M - 100M pages
>  [ ] 100M - 1G pages
>  [ ] more than 1 gig pages
> 
> 2. How many servers do you have handling requests, disregarding
>network infrastructure.
>  [x] 1 - 5
>  [ ] 6 - 10
>  [ ] 11 - 20
>  [ ] 20 - 50
>  [ ] 50+
> 
> 3. Do you out source ... ( if only willing to in next year, mark with [W] )
>  [w] data center facilities like Exodus ( bandwidth, security, 
>fire suppression, cooling )
>  [w] networking equipment ( LAN routing, switches, firewalls, 
>web cluster front ends like alteons, cache servers ) 
>  [w] server hardware 
>  [w] server software management
>  [w] security ( firewalls, network monitoring, host monitoring )
>  [w] backups ( tape, network share, rotating off site storage )
>  [ ] file shares ( NFS, Samba space )
>  [ ] high volume email
>  [ ] high volume DNS
>  [w] network service monitoring
>  [w] geographically distributed DNS
>  [ ] streaming media, content distribution, like Akamai
>  [ ] network service load testing
> 
> 4. What is your web production budget per month?
>  [ ] up to $5,000
>  [ ] $5,000 - $10,000
>  [ ] $10,000 - $20,000
>  [ ] $20,000 - $50,000
>  [x] over $50,000
> 
> 5. Which web deployment issues are most important to your business?
>  [ ] cost
>  [x] scalability
>  [ ] fault tolerance, under 99.99% downtime
>  [ ] time to market
>  [ ] physical access to hardware & data
>  [x] network engineering expertise
>  [ ] web engineering expertise
> 
> 6. Would you be willing to out source the above services to facilities in:
>  [ ] Los Angeles, CA
>  [ ] San Francisco, CA
>  [ ] San Diego, CA
>  [x] New York, NY
>  [ ] Austin, TX
>  [ ] Seattle, WA
>  [x] London
>  [x] Amsterdam
>  [x] Paris
>  [x] Pittsburgh, PA :-)
> 
> 7. What OS's do you run in web production?
>  [x] Linux
>  [ ] Solaris
>  [ ] WinNT / Win2000
>  [x] *BSD
>  [ ] Other
>  [x] Could you switch?
>   
> 8. Are you currently a ...
>  [x] Engineer / Sysadmin / Developer
>  [x] Manager
>  [x] Consultant
> 
> 9. What databases are you using?
>  [x] MySQL
>  [x] Oracle
>  [ ] Sybase
>  [x] PostgreSQL
>  [ ] Informix
>  [ ] DB2
>  [ ] Could you switch?
> 
> 10. What does your database require:
>  [x] Speed
>  [x] Transactions
>  [ ] Clustering / Fault Tolerance
>  [ ] Clustering / Scalability
>  [ ] Database logic, i.e. triggers, procedures
>  [ ] Database integrity, i.e. referential constraints
> 
> 11. What are your web development languages?  
>  [x] Perl
>  [ ] Java
>  [x] C/C++
>  [ ] Python
>  [ ] Other



Re: database access

2000-11-10 Thread Tim Sweetman

Perrin Harkins wrote:
> 
> On Thu, 9 Nov 2000, Tim Sweetman wrote:
> > Apache::DBI is, as far as I know, dangerous, and people rarely seem to
> > warn of this.
> 
> It's no more dangerous than any other scheme for persistent connections,
> like JDBC pooling, etc.
> 
> > It's dangerous because:
> > (a) Although it rolls back any transactions automatically, it may not
> > deal with other persistant
> > state on the handle. (Does it clear MySQL table locks, for
> > instance?). Other settings, such
> > as the lock timeout (SQL: "SET LOCK MODE TO WAIT nnn") or isolation
> > levels, will also persist.
 
> Would you be interested in adding support for resetting some of these to
> Apache::DBI?  It's pretty easy to do, using PerlCleanupHandler like the
> auto-rollback does.  It would be database-specific though, so you'd have
> to find a way for people to explicitly request cleanups.

I suspect automating via DBI would be a major pain, because you'd have
to be able to identify the "dangerous" changes in state. Probably
requiring SQL to be parsed. :(

In principle, you could probably have a ->do_not_reuse method which
could be called before someone does something dangerous. As long as they
remember.

> I used to do something like this to call finish() on all of my cached
> statement handles, back when prepare_cached() used to die on unfinished
> handles.  (Now it just warns.)
> 
> > (b) Presumably, what were previously separate transactions on the same
> > database on different handles
> > can become entangled:
> >
> > TX1: BEGIN WORK
> > TX2: BEGIN WORK
> > TX1: INSERT A
> > TX2: COMMIT
> > TX1: INSERT B
> >
> > ... this would probably cause either fatal errors, or very strange
> > things to happen.
> 
> Wouldn't this be the same with Apache::DBI or without it?  Or are you
> saying that this would have been done with two separate database
> connections before Apache::DBI came into the mix?  You can still get
> multiple connections through Apache::DBI if you really want to.  Just vary
> anything at all in the connect string ({MyBogusParam => 1}) and you'll get
> a different handle.

I believe without Apache::DBI there'd be two handles. This could be
useful for some purposes... though is, in itself, dangerous if TX1 and
TX2 touch the same tables because you can get into a deadlock that your
database won't know about.

> So you would check handles in and out?  I suppose that would work, but it
> sounds like a lot of trouble to handle a very unusual case to me.

Could be. I _have_ seen such cases. I don't know how rare they are.
Checking handles in & out is a mixed blessing (since it slows you down
if you have lots of processes grabbing handles in autocommit mode &
performing single statements, in which case sharing handles is
harmless).

Cheers

--
Tim Sweetman
A L Digital
"Any technology distinguishable from magic is insufficiently advanced"



ApacheDBI persistant connections

2000-11-10 Thread Tamas

I have a problem with persistant connections from my PerlAuthHandler.

If you request a page, then I get 2 persistant connections to the
database. The quickly become sleeping connections. Fine so far.
Wait around 30 seconds and then refresh the page. And get another
2 sleeping connections. Obviously something is not right.

Could it be anything to with the versions of the DBD, DBI, Webserver,
mod_perl? If not, and it is just me being awful, how do I disconnect
those pesky connections?

I have a DESTROY function that I call ( $self->{dbh}->disconnect ),
but that doesn't appear to make any difference.

Thanks for any help,

Tom



RE: ApacheDBI persistant connections

2000-11-10 Thread Geoffrey Young



> -Original Message-
> From: Tamas [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 10, 2000 7:03 AM
> To: mod perl
> Subject: ApacheDBI persistant connections
> 
> 
> I have a problem with persistant connections from my PerlAuthHandler.
> 
> If you request a page, then I get 2 persistant connections to the
> database. The quickly become sleeping connections. Fine so far.
> Wait around 30 seconds and then refresh the page. And get another
> 2 sleeping connections. Obviously something is not right.

Apache::DBI caches connections per-connect string and per apache child -
thus
if you have 5 children and each foo.pl connects to two databases, you
eventually will get
10 database connections...

sounds like you are hitting another apache child with the refresh - try
httpd -X if you are still unsure...

> 
> Could it be anything to with the versions of the DBD, DBI, Webserver,
> mod_perl? If not, and it is just me being awful, how do I disconnect
> those pesky connections?
> 
> I have a DESTROY function that I call ( $self->{dbh}->disconnect ),
> but that doesn't appear to make any difference.

no need to worry about that, disconnect() is a no-op under Apache::DBI...

HTH

--Geoff

> 
> Thanks for any help,
> 
> Tom
> 



Re: Fast DB access

2000-11-10 Thread Bill Moseley

At 09:20 PM 11/09/00 +, Tim Bunce wrote:
>On Thu, Nov 09, 2000 at 08:27:29PM +, Matt Sergeant wrote:
>> On Thu, 9 Nov 2000, Ask Bjoern Hansen wrote:
>> > If you're always looking stuff up on simple ID numbers and
>> > "stuff" is a very simple data structure, then I doubt any DBMS can
>> > beat 
>> > 
>> >  open D, "/data/1/12/123456" or ...
>> > 
>> > from a fast local filesystem.
>> 
>> Note that Theo Schlossnagel was saying over lunch at ApacheCon that if
>> your filename has more than 8 characters on Linux (ext2fs) it skips from a
>> hashed algorithm to a linear algorithm (or something to that affect). So
>> go careful there. I don't have more details or a URL for any information
>> on this though.
>
>Similarly on Solaris (and perhaps most SysV derivatives) path component
>names longer than 16 chars (configurable) don't go into the inode
>lookup cache and so require a filesystem directory lookup.

Ok, possibly 8 chars in Linux and 16 under Solaris.  Anything else to
consider regrading the maximum number of files in a given directory?

How about issues regarding file size?  If you had larger files/records
would DBM or RDBMS provider larger cache sizes?


Bill Moseley
mailto:[EMAIL PROTECTED]



Re: pre-loaded modules on Solaris

2000-11-10 Thread Bill Moseley

At 06:11 AM 11/10/00 -0500, barries wrote:
>> Address   Kbytes Resident Shared Private
>>   --  -- ---
>> total Kb   24720   227203288   19432  <<< pre-loaded modules
>> total Kb   14592   1297630969880  <<< not pre-loaed modules.

>Stupid question, probably, but when running the non-pre-loaded version,
>are you sure all the same modules are being loaded?

Yes.  According to perl-status, anyway.  Some modules are loaded into the
parent, of course, because of mod_perl.  But when not pre-loading I start
the server, look at perl-status and then made some requests and looked
again to see what was loaded.  The difference is what modules I'm use'ing
in my test.

>I'm wondering if there's
>some set of modules that, for some reason, isn't being loaded by the
>sequence of requests you're firing against all of your httpds to
>get the servers "warmed up" to represent real-life state.

When looking at pmap it looks like the main difference in "private" memory
usage is in the heap.  I'm not clear why the heap would end up so much
bigger when pre-loading modules.

Unfortunately, Linux doesn't seem to have the same reporting abilities as
Solaris, but using /proc//statm to show shared and private memory
under these same test showed that pre-loading was a big win.  So it seems
like a Solaris issue. 




Bill Moseley
mailto:[EMAIL PROTECTED]



ASP Editor

2000-11-10 Thread Differentiated Software Solutions Pvt. Ltd



Hi,
 
We are using Apache::ASP. Could anybody refer us to 
a decent windows based editor for this.
 
We want an editor which will have syntax 
highlighting features for both ASP objects as well as perlscript.
 
Thanks,
 
Murali
 
Differentiated Software Solutions Pvt. Ltd.176, 
Ground Floor, 6th Main,2nd Block, RT NagarBangalore - 560032Phone : 
91 80 3431470www.diffsoft.com


RE: pre-loaded modules on Solaris

2000-11-10 Thread John Hughes

> At 06:11 AM 11/10/00 -0500, barries wrote:
> >> Address   Kbytes Resident Shared Private
> >>   --  -- ---
> >> total Kb   24720   227203288   19432  <<< pre-loaded modules
> >> total Kb   14592   1297630969880  <<< not pre-loaed modules.
>
> When looking at pmap it looks like the main difference in "private" memory
> usage is in the heap.  I'm not clear why the heap would end up so much
> bigger when pre-loading modules.

A guess:  When pmap says "shared" it means stuff that realy shared.
I.E. it's not counting stuff that is marked copy-on-write, which is
shared UNTIL YOU TRY TO MODIFY IT.

Using pre-loaded modules you will get some things (XS) mmaped in as
shared, read-only and a whole bunch of stuff loaded into the heap.
this is "shared" when you fork, until you change it.

The trick is that most of the perl "bytecode" doesn't get modified after
it's loaded, so it'll stay "shared".

--
John Hughes <[EMAIL PROTECTED]>,
CalvaEDI SA.Tel: +33-1-4313-3131
66 rue du Moulin de la Pointe,  Fax: +33-1-4313-3139
75013 PARIS.




Re: ASP Editor

2000-11-10 Thread Ruben I Safir

Why would you ask this on a mod perl mailing list?

Use EMACS.



RE: ASP Editor

2000-11-10 Thread Chris Strom



Emacs, 
of course!  Use it in conjunction with MMM Mode for Emacs (http://mmm-mode.sourceforge.net/).  
Get the latest version of Emacs for windows from http://www.gnu.org/software/emacs/windows/ntemacs.html 
or http://www.xemacs.org  (my 
preference is for the former).

  -Original Message-From: Differentiated Software 
  Solutions Pvt. Ltd [mailto:[EMAIL PROTECTED]]Sent: Friday, November 
  10, 2000 7:07 AMTo: [EMAIL PROTECTED]Subject: ASP 
  Editor
  Hi,
   
  We are using Apache::ASP. Could anybody refer us 
  to a decent windows based editor for this.
   
  We want an editor which will have syntax 
  highlighting features for both ASP objects as well as perlscript.
   
  Thanks,
   
  Murali
   
  Differentiated Software Solutions Pvt. 
  Ltd.176, Ground Floor, 6th Main,2nd Block, RT NagarBangalore - 
  560032Phone : 91 80 3431470www.diffsoft.com


Re: Dealing with spiders

2000-11-10 Thread Marko van der Puil

Hi,

I had the same thing, sometimes the spiders are programmed VERY sloppy. I had a
site that responed to ANY request made to its location. The mayoraty of spiders
does not understand about single and double qoutes or if you leave quotes out of
your HREF's at all. also I understand that absolute href="/bla" and relative
href="../bla" are also a problem.

Those spiders would simply start getting urls like GET
/foo/file=1243/date=12-30-2000/name=foobar'/foo/file=1243/date=12-30-2000/name=foobar

or
GET ../bla'
or
GET ../bla/'../bla'../bla'
aso...

then that page would generate a page with a load of faulty links that would also
be followed.
alle HREF got built on the basis of the data that were in the requested URL.

Then other spiders got those faulty links from eachother and soon I got more
traffic from spiders trying to index faulty links than from regular visitors. :)

What I did was to check the input for a particular url and see if it was correct.
(should have done that in the first place.) Then I 404red the bastards I am
now redirecting them to the main page, which looks nicer on yer logs too. Plus
the spider might be tempted to spider yer page regularly. (most spiders drop
redirects.) You could also just return a plaintext OK. lots of nice 200's in yer
stats...
Another solution I have seen is returning a doorway page to your site.
(Searchengine SPAM!) Thats hittingthem back where it hurts. :)

I've made remarks about this to the owners of those spiders (excite/altavista)
but I have had no satisfactory responses from them.

What we could do as a community is create spiderlawenforcement.org, a centralized
database where we keep track of spiders and how they index our sites. We could
build a database of spiders indexed by Agent tag, those following robots.txt and
those explicitly exploiting that, or blacklist some by IP if they keep breaking
the rules. Lots of developers could use this database to block those nasty sons
of er well, sons of spiders I suppose. All opensourced of course, and the
data available for free, some perl modules to approach the db. Send an email to
the administrator of the spider everytime a spider tries a bad link on a member
site, and watch how fast thell fix the bl**dy things!

Let me know if any of you are interrested in such a thing.



Bill Moseley wrote:

> This is slightly OT, but any solution I use will be mod_perl, of course.
>
> I'm wondering how people deal with spiders.  I don't mind being spidered as
> long as it's a well behaved spider and follows robots.txt.  And at this
> point I'm not concerned with the load spiders put on the server (and I know
> there are modules for dealing with load issues).
>
> But it's amazing how many are just lame in that they take perfectly good
> HREF tags and mess them up in the request.  For example, every day I see
> many requests from Novell's BorderManager where they forgot to convert HTML
> entities in HREFs before making the request.
>
> Here's another example:
>
> 64.3.57.99 - "-" [04/Nov/2000:04:36:22 -0800] "GET /../../../ HTTP/1.0" 400
> 265 "-" "Microsoft Internet Explorer/4.40.426 (Windows 95)" 5740
>
> In the last day that IP has requested about 10,000 documents.  Over half
> were 404 requests where some 404s were non-converted entities from HREFs,
> but most were just for documents that do not and have never existed on this
> site.  Almost 1000 request were 400s (Bad Request like the example above).
> And I'd guess that's not really the correct user agent, either
>
> In general, what I'm interested in stopping are the thousands of requests
> for documents that just don't exist on the site.  And to simply block the
> lame ones, since they are, well, lame.
>
> Anyway, what do you do with spiders like this, if anything?  Is it even an
> issue that you deal with?
>
> Do you use any automated methods to detect spiders, and perhaps block the
> lame ones?  I wouldn't want to track every IP, but seems like I could do
> well just looking at IPs that have a high proportion of 404s to 200 and
> 304s and have been requesting over a long period of time, or very frequently.
>
> The reason I'm asking is that I was asked about all the 404s in the web
> usage reports.  I know I could post-process the logs before running the web
> reports, but it would be much more fun to use mod_perl to catch and block
> them on the fly.
>
> BTW -- I have blocked spiders on the fly before -- I used to have a decoy
> in robots.txt that, if followed, would add that IP to the blocked list.  It
> was interesting to see one spider get caught by that trick because it took
> thousands and thousands of 403 errors before that spider got a clue that it
> was blocked on every request.
>
> Thanks,
>
> Bill Moseley
> mailto:[EMAIL PROTECTED]

--
Yours sincerely,
Met vriendelijke groeten,


Marko van der Puil http://www.renesse.com
   [EMAIL PROTECTED]





Re: pre-loaded modules on Solaris

2000-11-10 Thread John Siracusa

On 11/10/00 10:15 AM, John Hughes wrote:
> A guess:  When pmap says "shared" it means stuff that realy shared.
> I.E. it's not counting stuff that is marked copy-on-write, which is
> shared UNTIL YOU TRY TO MODIFY IT.

Is there any way to measure the size of the shared copy-on-write pages on
Solaris?  It seems insane that everyone just "assumes" that all this
copy-on-write goodness is happening, despite (seemingly) no way to measure
it.  I'll admit, it's always been my assumption too, but I'd really like
some hard numbers to back me up.

-John




Re: Fast DB access

2000-11-10 Thread Les Mikesell

I think it is at least to the point where commercial code would be
released - free software never has any pressure to make claims
of stability even when they can...   A lot of places are using it in
production just to avoid the possibility of a slow fsck after a crash,
but it is enormously faster at creating and deleting files too because
everything is indexed so it would be an ideal stash for fast changing
session data.   If you don't trust it for the whole system you can just
use it on one partition for the session database.   Several Linux
distributions include it now.

- Original Message -
From: "Gunther Birznieks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 10, 2000 12:58 AM
Subject: Re: Fast DB access


> Isn't that a beta-level filesystem?
>
> At 12:47 AM 11/10/2000 -0600, Les Mikesell wrote:
>
> >- Original Message -
> >From: "Tim Bunce" <[EMAIL PROTECTED]>
> >
> > > > > If you're always looking stuff up on simple ID numbers and
> > > > > "stuff" is a very simple data structure, then I doubt any DBMS can
> > > > > beat
> > > > >
> > > > >  open D, "/data/1/12/123456" or ...
> > > > >
> > > > > from a fast local filesystem.
> > > >
> > > > Note that Theo Schlossnagel was saying over lunch at ApacheCon that
if
> > > > your filename has more than 8 characters on Linux (ext2fs) it skips
from
> >a
> > > > hashed algorithm to a linear algorithm (or something to that
affect). So
> > > > go careful there. I don't have more details or a URL for any
information
> > > > on this though.
> > >
> > > Similarly on Solaris (and perhaps most SysV derivatives) path
component
> > > names longer than 16 chars (configurable) don't go into the inode
> > > lookup cache and so require a filesystem directory lookup.
> >
> >If you are building a new system with this scheme, try ReiserFS on
> >a Linux box.   It does not suffer from the usual problems when
> >you put a large number of files in one directory and is extremely
> >fast at lookups.
> >
> >   Les Mikesell
> >   [EMAIL PROTECTED]
>
> __
> Gunther Birznieks ([EMAIL PROTECTED])
> eXtropia - The Web Technology Company
> http://www.extropia.com/
>




Re: Dealing with spiders

2000-11-10 Thread Bill Moseley

At 03:29 PM 11/10/00 +0100, Marko van der Puil wrote:
>What we could do as a community is create spiderlawenforcement.org,
>a centralized database where we keep track of spiders and how they
>index our sites.

It's an issue weekly, but hasn't become that much of a problem yet.  The
bad spiders could just change IPs and user agent strings, too.

Yesterday I had 12,000 requests from a spider, but the spider added a slash
to the end of every query string so over 11,000 were invalid requests --
but the Apache log showed the requests as being a 200 (only the application
knew it was a bad request).

At this point, I'd just like to figure out how to detect them
programmatically.  It seems easy to spot them as a human looking through
the logs, but less so with a program.  Some spiders fake the user agent.

It probably makes sense to run a cron job every few minutes to scan the
logs and write out a file of bad IP numbers, and use mod_perl to the list
of IPs to block every 100 requests or so.  I could look for lots of
requests from the same IP with a really high relation of bad requests to
good.  But I'm sure it wouldn't be long before an AOL proxy got blocked.

Again, the hard part is finding a good way to detect them...

And in my experience blocking doesn't always mean the requests from that
spider stop coming ;)




Bill Moseley
mailto:[EMAIL PROTECTED]



[OT] www.modssl.org & www.openssl.org mirrors?

2000-11-10 Thread B. Burke

Does anyone know mirror sites for these servers?  It seems they are having troubles
this morning.  I asked the modssl-users list, but since the server seems to be having
troubles, I'm not sure if my message got through.

Thanks,
Brian B.
[EMAIL PROTECTED]




Re: Building a ModPerl ISP for you!

2000-11-10 Thread Stas Bekman

> I'm the author of Apache::ASP, and a regular contributor
> to this list, but today I have something different!  I am 
> looking at building a high end ISP for the likes of 
> modperlers, who just need a little more, and would like 
> some of your feedback.
> 
> Below is a survey that would be useful for you to fill out
> for early market research.  If you could do at least some
> of it and mail it back to me, you are entitled to my blessings 
> and endless advice, so just ask. ;)

Josh, I'll be writing the next article for apachetoday.com soon (well it's
long time overdue, but I'm long time overkilled :( ) So this one is about
mod_perl and ISPs mainly. I'll talk both about the technical issues and
actual examples of mod_perl ISP providers that I've collected back in
August by contacting the ISPs listed on perl.apache.org.

So first if anybody wants to get into the article and hasn't contacted me
before, let me know. Please post to *me* only if *relevant*. What's
relevant? You happen to provide ISP service with mod_perl and you are
willing to give the contact info details/prices and other info.

Second, Josh if you want me to do something for you over this article let
me know. 

P.S. I also suppose that folks would better answer the survey form in
private emails to Josh, the traffic here is already too high... Thanks!

_
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://perlmonth.com   perl.org   apache.org





Re: Dealing with spiders

2000-11-10 Thread Christoph Wernli

Bill Moseley wrote:
> 
> At 03:29 PM 11/10/00 +0100, Marko van der Puil wrote:
> >What we could do as a community is create spiderlawenforcement.org,
> >a centralized database where we keep track of spiders and how they
> >index our sites.
> 
> At this point, I'd just like to figure out how to detect them
> programmatically.  It seems easy to spot them as a human looking through
> the logs, but less so with a program.  Some spiders fake the user agent.

Randal wrote Stonehenge::Throttle to deal with this - the relevant article is here:
<[EMAIL PROTECTED]">http://forum.swarthmore.edu/epigone/modperl/tarviglang/[EMAIL PROTECTED]>

Cheers,

-Christoph

-- 
Let's say the docs present a simplified view of reality...:-)
 -- Larry Wall in  <[EMAIL PROTECTED]>



Strange messages in mod_perl enabled Apache

2000-11-10 Thread Ilya Martynov

Hi,

Recently I've noticed strange lookin messages in error log of mod_perl
Apache. It looks like:

Backend sent D message without prior T
unexpected character n following 'I'

or sometimes like:

Unknown protocol character '.' read from backend.  (The protocol character
is the first character the backend sends in response to a query it receives).

Have anybody seen it? What can it mean?

Version of mod_perl 1.24
Version of Apache 1.3.14

I have suspicion that it can be DBD::Pg messages but I'm not sure yet.
Version of DBD::Pg is 0.93.

-- 
Ilya Martynov
AGAVA Software Company, http://www.agava.com




unsubscribe modperl

2000-11-10 Thread geetika . bansal

unsubscribe modperl





fixed length file database interface?

2000-11-10 Thread cbell

Hello everyone...

Does anyone know  of a database interface similar to DBD::CSV that works
with text files with fixed length fields/records




Re: ASP Editor

2000-11-10 Thread Kee Hinckley

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

At 5:37 PM +0530 11/10/00, Differentiated Software Solutions Pvt. Ltd wrote:
>Hi,
>
>We are using Apache::ASP. Could anybody refer us to a decent windows 
>based editor for this.
>
>We want an editor which will have syntax highlighting features for 
>both ASP objects as well as perlscript.

Vim should work.  I know there have been syntax files created for 
HTML::Embperl, ASP ones should be straightforward if someone hasn't 
already done them.

Of course neither Vim or Emacs are exactly "pick it up and start 
running" editors.
- -- 

Kee Hinckley - Somewhere.Com, LLC - Cyberspace Architects
Now Playing - Folk, Rock, and odd stuff - http://www.somewhere.com/radio.pls

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

-BEGIN PGP SIGNATURE-
Version: PGPfreeware 6.5.2 for non-commercial use 

iQA/AwUBOgwwQCZsPfdw+r2CEQITmgCeJuWRDnZfcIvgjbC6v7pkv/mbVJ4AoJpD
JORLjuNWAv9CJSgjp+h7Obn/
=IMqa
-END PGP SIGNATURE-



RE: dynamic vs. mostly static data

2000-11-10 Thread Jason Liu

Is a package global var, such as %CACHE in the code below, persistent during
the life of a child process?  Does each child get a copy of %CACHE after the
parent forks?

Thanks,

Jason
>
> i often do something like this where i allow each individual child
> process to cache it's data.  i do something like this:
>
> package Apache::Foo;
>
> use strict;
> use Apache::Constants;
> use POSIX 'strftime';
>
> use constant CACHE_EXPIRES => 3600; # one hour
> use vars qw[ %CACHE ];
> %CACHE = ();
>
> sub handler {
> my $r = shift;
>
> eval {
> my $expires = $CACHE{'expires'} || 0;
> if ($expires < time) {
> my @data = < some routine >;
> my $t = HTML::Template->new(filename  => 'foo.tmpl',
> die_on_bad_params => 0,
> cache => 1);
> $t->param('data', \@data);
>
> $CACHE{'data'}= $t->output;
> $CACHE{'expires'} = time + CACHE_EXPIRES;
> }
> $r->print($CACHE{'data'});
> };
>
> return print_err($r, $@) if $@;
> return OK;
> }
>
> 1;
>
> btw, i'd really recommend you look into using Template Toolkit.  it's a
> much more powerful and flexible templating system than HTML::Template,
> but i digress (and might start a flame war against myself by saying this).
>
> hth,
>
> ky
>
>




Re: dynamic vs. mostly static data

2000-11-10 Thread barries

On Fri, Nov 10, 2000 at 10:46:03AM -0800, Jason Liu wrote:
> Is a package global var, such as %CACHE in the code below, persistent during
> the life of a child process?

Yup.

> Does each child get a copy of %CACHE after the parent forks?

For all intents and purposes, yes.  Most OSs will mark those pages
Copy on Write.

- Barrie



unsubscribe modperl

2000-11-10 Thread Dan & Oana

unsubscribe modperl




Re: database access

2000-11-10 Thread Perrin Harkins

On Fri, 10 Nov 2000, Tim Sweetman wrote:
> > Would you be interested in adding support for resetting some of these to
> > Apache::DBI?  It's pretty easy to do, using PerlCleanupHandler like the
> > auto-rollback does.  It would be database-specific though, so you'd have
> > to find a way for people to explicitly request cleanups.
> 
> I suspect automating via DBI would be a major pain, because you'd have
> to be able to identify the "dangerous" changes in state. Probably
> requiring SQL to be parsed. :(

The current rollback cleanup doesn't parse SQL.  It knows that a rollback
won't do damage if there are no transactions to be cleaned up, so it's
safe to do every time.  If there are other things that work this way, you
could add them.  Probably wouldn't work for things like MySQL table locks
though.  People will have to do that themselves.

> In principle, you could probably have a ->do_not_reuse method which
> could be called before someone does something dangerous. As long as they
> remember.

But that would also mean no more persistent connection.  Maybe that would
work if you don't do it very often.

- Perrin




Re: database access

2000-11-10 Thread Les Mikesell

Perrin Harkins wrote:
> 
> On Fri, 10 Nov 2000, Tim Sweetman wrote:
> > > Would you be interested in adding support for resetting some of these to
> > > Apache::DBI?  It's pretty easy to do, using PerlCleanupHandler like the
> > > auto-rollback does.  It would be database-specific though, so you'd have
> > > to find a way for people to explicitly request cleanups.
> >
> > I suspect automating via DBI would be a major pain, because you'd have
> > to be able to identify the "dangerous" changes in state. Probably
> > requiring SQL to be parsed. :(
> 
> The current rollback cleanup doesn't parse SQL.  It knows that a rollback
> won't do damage if there are no transactions to be cleaned up, so it's
> safe to do every time.  If there are other things that work this way, you
> could add them.  Probably wouldn't work for things like MySQL table locks
> though.  People will have to do that themselves.

If the backend supports rollback, couldn't you just try that instead
of the ping method to see if you are still connected and get the
cleanup as a side effect?

 
> > In principle, you could probably have a ->do_not_reuse method which
> > could be called before someone does something dangerous. As long as they
> > remember.
> 
> But that would also mean no more persistent connection.  Maybe that would
> work if you don't do it very often.

It would be very useful to be able to specify at connect time that
you don't want a particular connection to be persistent.  If you have
a lot of small databases or some with different user/password
permissions
you accumulate too many backend servers - but if you also have one
or more connections used all the time you don't want to give up
Apache::DBI.  I'm not sure it is worth caching MySQL connections
on the same host, either since it is so fast to start up.  Has
anyone timed the difference?

   Les Mikesell
   [EMAIL PROTECTED]



Re: database access

2000-11-10 Thread clayton cottingham

Les Mikesell wrote:
> 
> Perrin Harkins wrote:
> >
> > On Fri, 10 Nov 2000, Tim Sweetman wrote:
> > > > Would you be interested in adding support for resetting some of these to
> > > > Apache::DBI?  It's pretty easy to do, using PerlCleanupHandler like the
> > > > auto-rollback does.  It would be database-specific though, so you'd have
> > > > to find a way for people to explicitly request cleanups.
> > >
> > > I suspect automating via DBI would be a major pain, because you'd have
> > > to be able to identify the "dangerous" changes in state. Probably
> > > requiring SQL to be parsed. :(
> >
> > The current rollback cleanup doesn't parse SQL.  It knows that a rollback
> > won't do damage if there are no transactions to be cleaned up, so it's
> > safe to do every time.  If there are other things that work this way, you
> > could add them.  Probably wouldn't work for things like MySQL table locks
> > though.  People will have to do that themselves.
> 
> If the backend supports rollback, couldn't you just try that instead
> of the ping method to see if you are still connected and get the
> cleanup as a side effect?
> 
> 
> > > In principle, you could probably have a ->do_not_reuse method which
> > > could be called before someone does something dangerous. As long as they
> > > remember.
> >
> > But that would also mean no more persistent connection.  Maybe that would
> > work if you don't do it very often.
> 
> It would be very useful to be able to specify at connect time that
> you don't want a particular connection to be persistent.  If you have
> a lot of small databases or some with different user/password
> permissions
> you accumulate too many backend servers - but if you also have one
> or more connections used all the time you don't want to give up
> Apache::DBI.  I'm not sure it is worth caching MySQL connections
> on the same host, either since it is so fast to start up.  Has
> anyone timed the difference?
> 
>Les Mikesell
>[EMAIL PROTECTED]




as far as i can tell the problem here is in the design of the particular
db your connecting to

no one database is going to be architected
in the same way

so providing an abstracted layer to handle this will be a very tough 
call 

it would be great to see a DBI::persist
or APache::DBI::persist

but it would be hard to implement down the line 
to the DBD::***

as each one of those drivers would have to be able to handle the
persistence call in their own way

in some cases this would be an easily handled affair and in others a
real horror show of coding


correct?



Re:[OT] unsubscribe modperl

2000-11-10 Thread Paul

--- Dan & Oana <[EMAIL PROTECTED]> wrote:
> unsubscribe modperl

I've seen several of these for the past day or two, and was going to
respond with instructions on how to go about unsubscribingand seem
to have deleted mine. How do I go about getting another copy of
list-command instructions?

Paul

__
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
http://shopping.yahoo.com/



PerlSetEnv leaking outside its intended(?) scope

2000-11-10 Thread martin langhoff

hi list,

I guess it has to do with my terrible ignorance, but I had always
thought that PerlSetEnv placed inside a VirtualHost would be visible
only inside that particular vhost.

Re-reading the F***ing Manual (that is, The Guide), I find no clear
evidence of this. 

So, if

...
PerlSetEnv FOO true



...
# PerlSetEnv FOO true   


will scripts/handlers placed in bar.com be able to read $ENV{FOO} ?


martin



Re:[OT] unsubscribe modperl

2000-11-10 Thread G.W. Haywood

Hi Paul,

On Fri, 10 Nov 2000, Paul wrote:

> How do I go about getting another copy of list-command instructions?

You get them with every message.  Look in the headers.

73,
Ged.




Re: [OT] unsubscribe modperl

2000-11-10 Thread Kip Cranford

On: Fri, 10 Nov 2000 13:46:33 PST Paul wrote:

>--- Dan & Oana <[EMAIL PROTECTED]> wrote:
>> unsubscribe modperl
>
>I've seen several of these for the past day or two, and was going to
>respond with instructions on how to go about unsubscribingand seem
>to have deleted mine. How do I go about getting another copy of
>list-command instructions?
>
>Paul
>

Go to 

http://perl.apache.org/#maillists

for information.

--kip



Re: [OT] unsubscribe modperl

2000-11-10 Thread ___cliff rayman___

from whatever mail reader u are using, choose show all headers.
the unsubscribe instructions are usually in there.

Paul wrote:

> --- Dan & Oana <[EMAIL PROTECTED]> wrote:
> > unsubscribe modperl
>
> I've seen several of these for the past day or two, and was going to
> respond with instructions on how to go about unsubscribingand seem
> to have deleted mine. How do I go about getting another copy of
> list-command instructions?
>
> Paul
>
> __
> Do You Yahoo!?
> Thousands of Stores.  Millions of Products.  All in one Place.
> http://shopping.yahoo.com/

--
___cliff [EMAIL PROTECTED]http://www.genwax.com/





Help on unsubscribe from modperl

2000-11-10 Thread parthasarathy mahendirababu

Hi,

Can anyone help how to unsubscribe from modperl group??

Mahen.


>From: Perrin Harkins <[EMAIL PROTECTED]>
>Reply-To: Perrin Harkins <[EMAIL PROTECTED]>
>To: Tim Sweetman <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: database access
>Date: Fri, 10 Nov 2000 12:50:13 -0800 (PST)
>
>On Fri, 10 Nov 2000, Tim Sweetman wrote:
> > > Would you be interested in adding support for resetting some of these 
>to
> > > Apache::DBI?  It's pretty easy to do, using PerlCleanupHandler like 
>the
> > > auto-rollback does.  It would be database-specific though, so you'd 
>have
> > > to find a way for people to explicitly request cleanups.
> >
> > I suspect automating via DBI would be a major pain, because you'd have
> > to be able to identify the "dangerous" changes in state. Probably
> > requiring SQL to be parsed. :(
>
>The current rollback cleanup doesn't parse SQL.  It knows that a rollback
>won't do damage if there are no transactions to be cleaned up, so it's
>safe to do every time.  If there are other things that work this way, you
>could add them.  Probably wouldn't work for things like MySQL table locks
>though.  People will have to do that themselves.
>
> > In principle, you could probably have a ->do_not_reuse method which
> > could be called before someone does something dangerous. As long as they
> > remember.
>
>But that would also mean no more persistent connection.  Maybe that would
>work if you don't do it very often.
>
>- Perrin
>

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.




cybersource generating lots of zombies

2000-11-10 Thread Peter J. Schoenster

Hi,

Anyone use cybersource?

I'm using it in a mod_perl environement (registry) and whenever I 
call the cybersource stuff it creates zombies on my system: look 
at this (498 zombie):

 1:36pm  up 10 days, 19:09,  2 users,  load average: 0.51, 0.53 
570 processes: 70 sleeping, 2 running, 498 zombie, 0 stopped

  PID USER PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU 
%MEM   TIME COMMAND
14112 nobody16   0 00 0 Z   0 15.3  0.0   0:00 
do_enc2 

It seems do_enc2 might be invovled (lots of it everywhere).

Clues anyone?


Peter

---
"Reality is that which, when you stop believing in it, doesn't go
away".
-- Philip K. Dick



Re: Fast DB access

2000-11-10 Thread Matthew Byng-Maddick

On Fri, 10 Nov 2000, Les Mikesell wrote:
[ReiserFS]
> production just to avoid the possibility of a slow fsck after a crash,
> but it is enormously faster at creating and deleting files too because
> everything is indexed so it would be an ideal stash for fast changing
> session data.   If you don't trust it for the whole system you can just
> use it on one partition for the session database.   Several Linux
> distributions include it now.

As I recall, it has a problem if you manage to have a hash collision in
your naming, IIRC it was something to do with the way in which it
extends the hash it uses for dents. This is, of course, FUD. :) I've also
heard bad things about his attitude...

FreeBSD 4's softupdates make ufs rather wonderful too. These basically
make UFS's write() calls asynchronous, and hence much faster. They also
keep dependencies, and can be very good for spools

MBM

-- 
It is wrong always,  everywhere and for everyone  to believe anything upon
insufficient evidence-- W. K. Clifford




Re: Fast DB access

2000-11-10 Thread clayton cottingham

Matthew Byng-Maddick wrote:
> 
> On Fri, 10 Nov 2000, Les Mikesell wrote:
> [ReiserFS]
> > production just to avoid the possibility of a slow fsck after a crash,
> > but it is enormously faster at creating and deleting files too because
> > everything is indexed so it would be an ideal stash for fast changing
> > session data.   If you don't trust it for the whole system you can just
> > use it on one partition for the session database.   Several Linux
> > distributions include it now.
> 
> As I recall, it has a problem if you manage to have a hash collision in
> your naming, IIRC it was something to do with the way in which it
> extends the hash it uses for dents. This is, of course, FUD. :) I've also
> heard bad things about his attitude...
> 
> FreeBSD 4's softupdates make ufs rather wonderful too. These basically
> make UFS's write() calls asynchronous, and hence much faster. They also
> keep dependencies, and can be very good for spools
> 
> MBM
> 
> --
> It is wrong always,  everywhere and for everyone  to believe anything upon
> insufficient evidence-- W. K. Clifford



i was told by tom lane , a developer of postgres {possible head one
afaik}

said around last year that it ran the best on freebsd /scsi 

he didnt like using linux at the time because

of ext2 paging probs but now id sure like to know about linux and
reiserfs

since ive been running mandrake 7.2 on reiserfs, and postgres 7.01 seems
to run very fine



problems installing mod_perl & mod_ssl

2000-11-10 Thread B. Burke

I've tried installing mod_perl & mod_ssl, following both the instructions at  
http://perl.apache.org/guide
and the INSTALL.simple.mod_ssl file that comes with mod_perl-1.24.  When I run the 
perl Makefile.PL
for mod_perl, it keeps complaining that I need apache 1.3.0.  I was able to install 
openssl without any
problems.

I'm using:
RedHat 6.0
apache 1.3.14
mod_perl 1.24
openssl 0.9.6
mod_ssl-2.7.1-1.3.14

Any help is most appreciated!!


Here's what happens when I try perl Makefile.PL:

% cd ../mod_perl-1.24
% perl Makefile.PL USE_APACI=1 EVERYTHING=1 SSL_BASE=/usr/local/ssl 
APACHE_PREFIX=/usr/local/apachessl 
APACI_ARGS=--enable-module=ssl,--enable-module=rewrite
Will configure via APACI
Enter `q' to stop search
Please tell me where I can find your apache src
 [../src] ../apache_1.3.14/src
Configure mod_perl with ../apache_1.3.14/src ? [y]
Shall I build httpd in ../apache_1.3.14/src for you? [y]
cp apaci/Makefile.libdir ../apache_1.3.14/src/modules/perl/Makefile.libdir
cp apaci/Makefile.tmpl ../apache_1.3.14/src/modules/perl/Makefile.tmpl
cp apaci/README ../apache_1.3.14/src/modules/perl/README
cp apaci/configure ../apache_1.3.14/src/modules/perl/configure
cp apaci/libperl.module ../apache_1.3.14/src/modules/perl/libperl.module
cp apaci/mod_perl.config.sh ../apache_1.3.14/src/modules/perl/mod_perl.config.sh
cp apaci/load_modules.pl.PL ../apache_1.3.14/src/modules/perl/load_modules.pl.PL
cp apaci/find_source.PL ../apache_1.3.14/src/modules/perl/find_source.PL
cp apaci/apxs_cflags.PL ../apache_1.3.14/src/modules/perl/apxs_cflags.PL
cp apaci/mod_perl.exp ../apache_1.3.14/src/modules/perl/mod_perl.exp
* WARNING *

  Apache Version 1.3.0 required, aborting...

* WARNING 

%


Thanks,
Brian B.






Re: problems installing mod_perl & mod_ssl

2000-11-10 Thread ___cliff rayman___

i think you'll need 1.24_01.
this fixes the versioning problem with 1.3.14

"B. Burke" wrote:

> I've tried installing mod_perl & mod_ssl, following both the instructions at  
>http://perl.apache.org/guide
> and the INSTALL.simple.mod_ssl file that comes with mod_perl-1.24.  When I run the 
>perl Makefile.PL
> for mod_perl, it keeps complaining that I need apache 1.3.0.  I was able to install 
>openssl without any
> problems.
>
> I'm using:
> RedHat 6.0
> apache 1.3.14
> mod_perl 1.24
> openssl 0.9.6
> mod_ssl-2.7.1-1.3.14
>
> Any help is most appreciated!!
>

--
___cliff [EMAIL PROTECTED]http://www.genwax.com/