Re: ApacheCon report

2000-10-31 Thread Gunther Birznieks

At 12:00 AM 10/31/2000 -0800, Perrin Harkins wrote:
>On Tue, 31 Oct 2000, Les Mikesell wrote:
> > > Ultimately, I don't see any way around the fact that proxying from one
> > > server to another ties up two processes for that time rather than one, so
> > > if your bottleneck is the number of processes you can run before running
> > > out of RAM, this is not a good approach.
> >
> > The point is you only tie up the back end for the time it takes to deliver
> > to the proxy, then it moves on to another request while the proxy
> > dribbles the content back to the client.   Plus, of course, it doesn't
> > have to be on the same machine.
>
>I was actually talking about doing this with no front-end proxy, just
>mod_perl servers.  That's what Theo was suggesting.

That might work. Although I think there's enough image files that get 
served by front-end proxies that it still makes sense to have the front-end 
proxy engines. As a bonus, if you write your app smart with cache directive 
headers, some of the dynamic content can truly be cached by the front-end 
server.

>I use a mod_proxy front-end myself and it works very well.
>
>- Perrin

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




Re: ApacheCon report

2000-10-31 Thread Perrin Harkins

On Tue, 31 Oct 2000, Gunther Birznieks wrote:
> As a bonus, if you write your app smart with cache directive 
> headers, some of the dynamic content can truly be cached by the front-end 
> server.

We're using this technique now and it really rocks.  Great performance.

- Perrin




hashes and mod_perl

2000-10-31 Thread Scott Alexander

Hi,

Is it possible using the magic of mod_perl to set a hash array available for all 
scripts without each script having to open the dbm file.

eg Each of my scripts tie a dbm file to a hash array (%output). (about 600 
elements)

In some of my scripts I'm using functions recursively. Passing %output to a 
function will work once put when it goes very deep recursively it doesn't work.

Anyway the orginal question is can I set the hash_array value at start up time 
and then access them from all scripts?

Thanks in advance. 




Re: Apache::ASP + Apache::Filter - how fast? (was:sending Apache::ASPoutput to a variable?)

2000-10-31 Thread Joshua Chamas

Jeff Ng wrote:
> 
> Turns out that speed is not the only problem...
> 
> I'm having some form submission problems when I chain modules like so:
> PerlHandler inFilter Apache::ASP
> 
> If I call $r->content in inFilter, Apache::ASP just hangs.  Has anyone seen
> this before?
> 
> Could it be because Apache and mod_perl were installed from RPMs?  I'll do a
> rebuild this weekend to check.
> 

This is common in chaining and module cooperation because
$r->content is a one time event, as the content gets consumed
on the first read.  What you can do is use Apache::ASP first
and your module second, no prob, because in Apache::ASP, I cache
the input and retie STDIN, so other environments, like CGI
can be initialized without interfering.

So it should work the other way around at least. I might also 
try creating creating a subclass of the apache request object, 
and override content to make it reusable.  I don't even know if 
its possible, but its worth looking into.

This is a common problem to chaining, filtering, and using
different environments at the same time.  If you repost
this as a more generic mod_perl problem, you may get 
more diverse responses.

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



Apache 1.3.12,SuExec,Apache::Registry and CGI problems

2000-10-31 Thread Antti Linno

Machine configuration:
SuSE Linux 6.4 (i386)
Kernel 2.2.14 (i686)
The Apache WWW Server Apache/1.3.12 (Unix) (SuSE/Linux)
mod_perl/1.21
PHP/4.0b4pl1
mod_ssl/2.6.2
OpenSSL/0.9.5
SuExec option

I tried to use htdig, but was unable to execute binary from virtual
server. Error log contained only a line about headers not sent. 
Virtual server configuration contained only line
ScriptAlias /cgi-bin/ /www/www.betoon.ee/cgi-bin/

With this configuration we were unable to run even the simplest cgi.
I thought that problem was in binary, so I changed to cgi search script.
No luck either.
Ok, smart dude(not me) then reconfigured virtual server with:

...

 Alias /bcgi /www/www.betoon.ee/cgi


AddHandler  perl-script .pl
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI 




PerlRequire /usr/include/apache/modules/perl/startup.perl
Options Indexes SymLinksIfOwnerMatch Includes MultiViews ExecCGI
AllowOverride All
PerlSetEnv EMBPERL_ESCMODE 4
PerlSetenv EMBPERL_OPTIONS 16





Ok cgi now seemingly works, but as search results I get the wierdest
answers(those queries that I made ages ago, I hope I didn't put any dirty
words in it for testing :P). My guess is Apache is caching something, but
I have no idea what, or how to prevent it, so the script still works.
Somebody thought it might be Apache::Registry.
 If i tested script in my machine(Apache 1.3.12, modperl 1.21 statically
built, no suexec or ssl, cgi worked in some public_html with htaccess
directives ExecCGI and cgi-script etc.) all worked well and nice, but that
server where it goes, gave me a finger.

If I forgot smthng, remind me
Appriciate , if someone even reads it :P

Antti





Re: hashes and mod_perl

2000-10-31 Thread G.W. Haywood

Hi there,

On Tue, 31 Oct 2000, Scott Alexander wrote:

> Is it possible using the magic of mod_perl to set a hash array
> available for all scripts without each script having to open the dbm
> file.

It's not really a mod_perl specific problem.  You need to take care of
the possibility that there will be conflicts between processes trying
to write to the same file, so you need to implement some sort of
locking.  It's in the Guide .
 
> In some of my scripts I'm using functions recursively. Passing
> %output to a function will work once put when it goes very deep
> recursively it doesn't work.

Pass a reference.

my $rhash = \%output;
my $result = func( $rhash );

$rhash _could_ be a global, but don't go there...

73,
Ged.




Re: how to really bang on a script?

2000-10-31 Thread G.W. Haywood

Hi all,

On Mon, 30 Oct 2000, Ask Bjoern Hansen wrote:
>
> On Sat, 28 Oct 2000, Christopher L. Everett wrote:
> 
> > OK, I confess: I've written (probably yet another) mod_perl banner 
> > exchange.  I need to know that when we serve 100K banners to 40K 
> 
> if anyone doubts that perl and mod_perl is a good solution for that,
> you can tell them that at ValueClick we can serve thousands and
> thousands of banners per second on our technology that is close to
> 100% Pure Perl.

And if anyone wants to know how to write an ad-blocking proxy using
the same technology it's on pages 374-381 of the first edition of the
Eagle Book, "Writing Apache Modules with Perl and C" ISBN 1-56592-567-X.

Works a treat.

73,
Ged.




Re: how to really bang on a script?

2000-10-31 Thread Matthew Byng-Maddick

On Mon, 30 Oct 2000, Perrin Harkins wrote:
> On Sat, 28 Oct 2000, Matthew Byng-Maddick wrote:
> > Theo, during the mod_backhand talk, or at lunch just before, I can't
> > remember.
> It was during the talk.  The tool is called Daquiri, and he said it was
> available in the mod_backhand CVS tree.

Ah yes, I remember someone joking about what flavour it was next to me. :)

MBM

-- 
Matthew Byng-Maddick   Home: <[EMAIL PROTECTED]>  +44 20  8981 8633  (Home)
http://colondot.net/   Work: <[EMAIL PROTECTED]> +44 7956 613942  (Mobile)
perl -e '$_="Oyvv bsswjfw Thtm mefmfw2\n";while(m([^\n])){$_=$'"'"';$a=$&;
$a=($a=~m(^\s)?$a:pack "c",unpack("c",$a)-5+($i++%5));print $a}print"\n";'




Re: how to really bang on a script?

2000-10-31 Thread David Hodgkinson

"G.W. Haywood" <[EMAIL PROTECTED]> writes:

> Hi all,
> 
> On Mon, 30 Oct 2000, Ask Bjoern Hansen wrote:
> >
> > On Sat, 28 Oct 2000, Christopher L. Everett wrote:
> > 
> > > OK, I confess: I've written (probably yet another) mod_perl banner 
> > > exchange.  I need to know that when we serve 100K banners to 40K 
> > 
> > if anyone doubts that perl and mod_perl is a good solution for that,
> > you can tell them that at ValueClick we can serve thousands and
> > thousands of banners per second on our technology that is close to
> > 100% Pure Perl.
> 
> And if anyone wants to know how to write an ad-blocking proxy using
> the same technology it's on pages 374-381 of the first edition of the
> Eagle Book, "Writing Apache Modules with Perl and C" ISBN 1-56592-567-X.

Hey, you leave ValueClick alone! They're the least worst out there!
(Is that a compliment?)

-- 
Dave Hodgkinson, http://www.hodgkinson.org
Editor-in-chief, The Highway Star   http://www.deep-purple.com
  Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
  -



Re: how to really bang on a script?

2000-10-31 Thread G.W. Haywood

Hi Dave,

On 31 Oct 2000, David Hodgkinson wrote:

> Hey, you leave ValueClick alone! They're the least worst out there!
> (Is that a compliment?)

Ok, truce.  There's room in the world for all sorts (even you and me:)

At the moment.

73,
Ged.






Re: hashes and mod_perl

2000-10-31 Thread G.W. Haywood

Hi again,

> > Pass a reference.
> > my $rhash = \%output;
> > my $result = func( $rhash );
> 
> Okay this solves my problem that I had.
> Is it in anyway possible to tie the hash once to a dbm file?
> At the moment it is tied every time a script is called. 

Sounds like you haven't really got to grips with handlers, and your
script is written in a cgi-like fashion.  You want mod_perl to load
the script once at startup, then just execute the things that need
executing when a handler is called.  Read the Guide.  I'm sorry it's
such a forbidding document thesedays, but it's really worth it.  Read
the Eagle Book too.  Then read it all again (unless your ability to
absorb densely packed information is absolutely astounding:).

> Does the line $test = dbmopen(%output, "/my.dbm", 0600) ; on 
> every script cause much work?

It depends what you mean by 'not much'.  Opening and closing files is
one of the life-blood activities of the operating system, so lots of
work has gone into making it as slick as possible.  But it still takes
more time than referring to areas of data directly in memory because
there's more to do and because the physics of storage is different.
What matters is how often your script gets called, and whether the
computer can keep ahead of its tasks under maximum load.  Someone who
serves, say, a hundred training courses to 400,000 users may go to
great lengths to cut execution times, but it might be that it doesn't
matter in your case.  Or you might get a kick out of tuning systems.
Only you can be the judge of that.

There are utilities out there to test performance, after a fashion.
Look at ab which comes with Apache when you install it.  But don't
forget that when Apache is serving pages, mod_perl or not, it's not
just your script that's doing the work.  It's a very complex system
that you're dealing with, which probably includes a worldwide network,
a bunch of communications devices and a browser, running on hardware
you've never seen and never will.

See also the thread "how to really bang on a script" in this list
which has some more references and some entertaining insights.  The
ISBN for the Eagle Book is in one of my posts on that thread.

73,
Ged.





RE: Probably a really stupid question

2000-10-31 Thread Geoffrey Young



> -Original Message-
> From: Jimi Thompson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 30, 2000 5:34 PM
> To: Geoffrey Young
> Subject: Re: Probably a really stupid question
> 
> 
> Geoffrey,
> 
> I'm still having problems, perl is installed, mod_perl is 
> installed.  I can
> call both of them directly and they work find. 

well, that's not really true - your 'can't find PerlHandler' error is a
pretty sure indication that mod_perl is not installed...

> However, when 
> I try to get
> Apache to execute the script is when it all falls apart.  I 
> have tried to
> find the module that you mentioned and I'm not able to locate 
> it.  

mod_so is part of the core apache distribution - it is one of two modules
you must compile in statically if you want other modules to be dynamically
loaded (read more about the apache DSO - dynamic sharing option in the
apache docs)


basically it boils down to this: either compile mod_perl into your apache
binary statically (which yours isn't since you get the PerlHandler error) or
enable Apache's DSO (via a complied in mod_so, which you don't have since
you get the LoadModule error) and enable mod_perl as a DSO using LoadModule.

there are instructions for both of these in perl.apache.org/guide - my
suggestion would be to compile a static mod_perl and deal with DSO later.
But the choice is yours...

HTH

--Geoff

> If you
> could provide a link, this might be helpful, especially to 
> other Solaris
> users.
> 
> No one else mentions this module in any of the install 
> instructions. 
> All
> the documentation seems to indicate you should just be able to install
> mod_perl (as long as perl is working) have it work.  Why this 
> applies to the
> entire rest of the known world and not me is a total mystery?
> 
> ACK!!
> 
> Geoffrey Young wrote:
> 
> > > -Original Message-
> > > From: Jimi Thompson [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, October 30, 2000 3:13 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Probably a really stupid question
> > >
> > >
> > > Problem - all files ending in the .pl extension display
> > > source code rather than
> > > being executed. In addition to not seeing the .pl's as
> > > executable I get this
> > > message when I try to start apache -
> > >
> > > callmaster% apachectl start
> > > Syntax error on line 793 of /usr/local/apache/conf/httpd.conf:
> > > Invalid command 'PerlHandler', perhaps mis-spelled or defined
> > > by a module not
> > > included in the server configuration
> > > apachectl start: httpd could not be started
> > >
> > > So then I change the LoadModule to
> > >
> > > LoadModule  perl_module libexec/libperl.so
> > >
> > > which then generates this error message -
> > >
> > > callmaster% apachectl start
> > > Syntax error on line 203 of /usr/local/apache/conf/httpd.conf:
> > > Invalid command 'LoadModule', perhaps mis-spelled or defined
> > > by a module not
> > > included in the server configuration
> > > apachectl start: httpd could not be started
> >
> > sounds like you don't have mod_so compiled in
> >
> > ./httpd -l
> >
> > should show mod_so.c, which is what controls the LoadModule 
> directive...
> >
> > HTH
> >
> > --Geoff
> >
> > >
> > > This would seem to indicate that mod_perl did not install
> > > correctly.  However,
> > > mod_perl states that it has installed.
> > > When I go to check the apache/libexec, it is empty - no
> > > mod-perl.  I don't
> > > understand why this isn't building properly.
> > >
> > > Any insight would be helpful...
> > >
> > > I've always done this via the RPM in Red Hat and this is on a
> > > Sparc Solaris 2.6
> > > box so maybe someone can give me a hand and tell me what I've
> > > missed.  I've
> > > attached the httpd.conf file and it appears to be correct,
> > > but it errors out (see
> > > above)
> > >
> > >
> > > Jimi Thompson
> > >
> > >
> > >
> 
> --
> Jimi Thompson
> Web Master
> L3 communications
> 
> "It's the same thing we do every night, Pinky."
> 
> 



Re: mod_perl problems..

2000-10-31 Thread G.W. Haywood

Hi there,

On Mon, 30 Oct 2000, Michael J. Freeman wrote:

> Can anyone please advise me what to do? 

I think it would help if you gave us more information.

Read mod_perl-1.xx/SUPPORT

73,
Ged.




Re: Problem with Apache::ASP

2000-10-31 Thread G.W. Haywood

Hi there,

On Mon, 30 Oct 2000, Fabio Albertin wrote:

> There's one thing I forgot to mention: I'm running a statically compiled
> version of Papche, as recommended in the Apache::ASP README, so I don't
> think my httpd.conf needs to load any modules, or does it?
> I checked my log file for the status message and it didn't mention
> mod_perl... Do I have to re-install it or how do I get it to work with my
> statically compiled Apache?

Are you sure you have only one version of Apache and/or that you are
running the right one?  Are you looking at the right log?  Check dates
and times.  If the server doesn't announce mod_perl in the log, it is
probably not installed...

73,
Ged.

PS: You didn't answer my question:
> 
> > Have you seen the Guide?  





Re: hashes and mod_perl

2000-10-31 Thread Scott Alexander



> Hi there,
> 
> On Tue, 31 Oct 2000, Scott Alexander wrote:
> 
> > Is it possible using the magic of mod_perl to set a hash array
> > available for all scripts without each script having to open the dbm
> > file.
> 
> It's not really a mod_perl specific problem.  You need to take care of
> the possibility that there will be conflicts between processes trying
> to write to the same file, so you need to implement some sort of
> locking.  It's in the Guide .

I'm using the hash to store different output languages and is only 
ever updated by one person. 100% of the time it's being read.

>  
> > In some of my scripts I'm using functions recursively. Passing
> > %output to a function will work once put when it goes very deep
> > recursively it doesn't work.
> 
> Pass a reference.
> 
> my $rhash = \%output;
> my $result = func( $rhash );

Okay this solves my problem that I had.

> 
> $rhash _could_ be a global, but don't go there...



Is it in anyway possible to tie the hash once to a dbm file?

At the moment it is tied every time a script is called. 

Does the line $test = dbmopen(%output, "/my.dbm", 0600) ; on 
every script cause much work?

Scott

> 
> 73,
> Ged.





Session data disappearing

2000-10-31 Thread cbell


Hi everyone, I'm sure this is a simple problem...
Im using Session.pm to track information between httpd requests. 
However, when I store some information in the session, it is gone
when I try to retrieve it later.  I've noticed the following things:
when I tie to the session I use the command Commit = 1, but in
my error_log, I get the following...
Commit ineffective with AutoCommit enabled at /usr/lib/perl5/site_perl/5.005/Apache/Session/Store/Postgres.pm
line 92
Then I turned AutoCommit off on my database connection but then I could
see in my error_log that the commands were being rolled back.
I'll try committing the changes to the database next, but then what's
the point of the Commit = 1 command in the Tie command?? The documentation
states it has to be like this. Does anyone know what the proper way of
doing this is?
Also, thanks to all who replied to my last post!!!  As you can
see I'm now up and running with Mod_perl
Chris


Re: Session data disappearing

2000-10-31 Thread Simon_Wilcox


Hi Chris, welcome on board !

  Are you changing data structures e.g. a element in a hash of hashes ?

  Apache::Session has documented behaviour where it only writes back changes
  if the top level variables have changed. If you are changing something
  deeper it will not be _seen_ as a change.

  The recommended approach is to use a timestamp at the top level to ensure
  that something always changes and forces a write.

  Simon Wilcox.






   From   cbell <[EMAIL PROTECTED]>  Date
   31 October 2000


To  
[EMAIL PROTECTED]  Time  17:30 



  Copy to (bcc: Simon Wilcox/BASE/WilliamsLea)



  Bcc Simon Wilcox/BASE/WilliamsLea



  Fax to



  Subject   Session data disappearing





Hi everyone, I'm sure this is a simple problem...

Im using Session.pm to track information between httpd requests.
However, when I store some information in the session, it is gone when I
try to retrieve it later.  I've noticed the following things:

when I tie to the session I use the command Commit = 1, but in my
error_log, I get the following...
Commit ineffective with AutoCommit enabled at
/usr/lib/perl5/site_perl/5.005/Apache/Session/Store/Postgres.pm line 92

Then I turned AutoCommit off on my database connection but then I could
see in my error_log that the commands were being rolled back.

I'll try committing the changes to the database next, but then what's
the point of the Commit = 1 command in the Tie command?? The
documentation states it has to be like this. Does anyone know what the
proper way of doing this is?

Also, thanks to all who replied to my last post!!!  As you can see I'm
now up and running with Mod_perl

Chris




Hi everyone, I'm sure this is a simple problem...
Im using Session.pm to track information between httpd requests. 
However, when I store some information in the session, it is gone
when I try to retrieve it later.  I've noticed the following things:
when I tie to the session I use the command Commit = 1, but in
my error_log, I get the following...
Commit ineffective with AutoCommit enabled at /usr/lib/perl5/site_perl/5.005/Apache/Session/Store/Postgres.pm
line 92
Then I turned AutoCommit off on my database connection but then I could
see in my error_log that the commands were being rolled back.
I'll try committing the changes to the database next, but then what's
the point of the Commit = 1 command in the Tie command?? The documentation
states it has to be like this. Does anyone know what the proper way of
doing this is?
Also, thanks to all who replied to my last post!!!  As you can
see I'm now up and running with Mod_perl
Chris












__


   This email contains proprietary information some or all of which may be
   legally privileged.  It is for the intended recipient only. If an addressing
   or transmission error has misdirected this email, please notify the author by
   replying to this email. If you are not the intended recipient you must not
   use, disclose, distribute, copy, print, or reply on this email.



Re: Session data disappearing

2000-10-31 Thread Gunther Birznieks

By the way, as an alternative suggestion, don't use postgres... use 
Session::File. I seem to recall that Postgres isn't the zippiest medium for 
storing sessions. It turns out plain files are pretty fast for small sets 
of blob data.

At 04:35 PM 10/31/00 +, [EMAIL PROTECTED] wrote:

>Hi Chris, welcome on board !
>
>   Are you changing data structures e.g. a element in a hash of hashes ?
>
>   Apache::Session has documented behaviour where it only writes back 
> changes
>   if the top level variables have changed. If you are changing something
>   deeper it will not be _seen_ as a change.
>
>   The recommended approach is to use a timestamp at the top level to 
> ensure
>   that something always changes and forces a write.
>
>   Simon Wilcox.
>
>
>
>
>
>
>From   cbell 
> <[EMAIL PROTECTED]>  Date
>31 October 2000
>
>
> To
> [EMAIL PROTECTED]  Time  17:30
>
>
>
>   Copy to (bcc: Simon Wilcox/BASE/WilliamsLea)
>
>
>
>   Bcc Simon Wilcox/BASE/WilliamsLea
>
>
>
>   Fax to
>
>
>
>   Subject   Session data disappearing
>
>
>
>
>
>Hi everyone, I'm sure this is a simple problem...
>
>Im using Session.pm to track information between httpd requests.
>However, when I store some information in the session, it is gone when I
>try to retrieve it later.  I've noticed the following things:
>
>when I tie to the session I use the command Commit = 1, but in my
>error_log, I get the following...
>Commit ineffective with AutoCommit enabled at
>/usr/lib/perl5/site_perl/5.005/Apache/Session/Store/Postgres.pm line 92
>
>Then I turned AutoCommit off on my database connection but then I could
>see in my error_log that the commands were being rolled back.
>
>I'll try committing the changes to the database next, but then what's
>the point of the Commit = 1 command in the Tie command?? The
>documentation states it has to be like this. Does anyone know what the
>proper way of doing this is?
>
>Also, thanks to all who replied to my last post!!!  As you can see I'm
>now up and running with Mod_perl
>
>Chris
>
>
>
>
>
>
>
>
>
>
>
>
>__
>
>
>This email contains proprietary information some or all of which may be
>legally privileged.  It is for the intended recipient only. If an 
> addressing
>or transmission error has misdirected this email, please notify the 
> author by
>replying to this email. If you are not the intended recipient you must not
>use, disclose, distribute, copy, print, or reply on this email.

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




[Fwd: Session data disappearing]

2000-10-31 Thread cbell





I read that in the manual, but was a little unsure of what it meant.  I understand
the concept just not how to implement it.

Right now I'm just storing a variable in the hash.. For example...

$hash{test} = "test";

Then if I look at the variable from another script (or the same script) it's just
not there.

[EMAIL PROTECTED] wrote:

> Hi Chris, welcome on board !
>
>   Are you changing data structures e.g. a element in a hash of hashes ?
>
>   Apache::Session has documented behaviour where it only writes back changes
>   if the top level variables have changed. If you are changing something
>   deeper it will not be _seen_ as a change.
>
>   The recommended approach is to use a timestamp at the top level to ensure
>   that something always changes and forces a write.
>
>   Simon Wilcox.
>
>From   cbell <[EMAIL PROTECTED]>  Date
>31 October 2000
>
>
> To
> [EMAIL PROTECTED]  Time  17:30
>
>
>   Copy to (bcc: Simon Wilcox/BASE/WilliamsLea)
>
>   Bcc Simon Wilcox/BASE/WilliamsLea
>
>   Fax to
>
>   Subject   Session data disappearing
>
> Hi everyone, I'm sure this is a simple problem...
>
> Im using Session.pm to track information between httpd requests.
> However, when I store some information in the session, it is gone when I
> try to retrieve it later.  I've noticed the following things:
>
> when I tie to the session I use the command Commit = 1, but in my
> error_log, I get the following...
> Commit ineffective with AutoCommit enabled at
> /usr/lib/perl5/site_perl/5.005/Apache/Session/Store/Postgres.pm line 92
>
> Then I turned AutoCommit off on my database connection but then I could
> see in my error_log that the commands were being rolled back.
>
> I'll try committing the changes to the database next, but then what's
> the point of the Commit = 1 command in the Tie command?? The
> documentation states it has to be like this. Does anyone know what the
> proper way of doing this is?
>
> Also, thanks to all who replied to my last post!!!  As you can see I'm
> now up and running with Mod_perl
>
> Chris
>
>   
>   Name: att1.htm
>att1.htm   Type: Hypertext Markup Language (text/html)
>   Encoding: base64
>Description: Internet HTML
>
>   
>
> __
>
>This email contains proprietary information some or all of which may be
>legally privileged.  It is for the intended recipient only. If an addressing
>or transmission error has misdirected this email, please notify the author by
>replying to this email. If you are not the intended recipient you must not
>use, disclose, distribute, copy, print, or reply on this email.





Re: Problem with Apache::ASP

2000-10-31 Thread Fabio Albertin


> PS: You didn't answer my question:
> > 
> > > Have you seen the Guide?  

I have, but it's rather confusing. I'll search for some conlusive answers
if I can find the time.


Fabio Albertin




Re: Problem with Apache::ASP

2000-10-31 Thread G.W. Haywood

Hi Fabio,

On Tue, 31 Oct 2000, Fabio Albertin wrote:

> > > > Have you seen the Guide?  
> 
> I have, but it's rather confusing.

Oh, dear, we'll have to do something about that.  Can you point out
any particular areas that are confusing?  (Don't just say "all of it",
please:)  We can have another look at it and see how it can be improved.

73,
Ged.





Re: Session data disappearing

2000-10-31 Thread Simon_Wilcox


That should work as far as I know, it sounds like it is not being tied correctly
to your store.

  Can you post your code to the list ?

  SW






   From   cbell <[EMAIL PROTECTED]>  Date
   31 October 2000


To  
Simon Wilcox/BASE/WilliamsLea@WilliamsLea   Time  17:58 



  Copy to



  Bcc



  Fax to



  Subject   Re: Session data disappearing





I read that in the manual, but was a little unsure of what it meant.  I
understand
the concept just not how to implement it.

Right now I'm just storing a variable in the hash.. For example...

$hash{test} = "test";

Then if I look at the variable from another script (or the same script) it's
just
not there.

[EMAIL PROTECTED] wrote:

> Hi Chris, welcome on board !
>
>   Are you changing data structures e.g. a element in a hash of hashes ?
>
>   Apache::Session has documented behaviour where it only writes back
changes
>   if the top level variables have changed. If you are changing something
>   deeper it will not be _seen_ as a change.
>
>   The recommended approach is to use a timestamp at the top level to
ensure
>   that something always changes and forces a write.
>
>   Simon Wilcox.
>
>From   cbell <[EMAIL PROTECTED]>
Date
>31 October 2000
>
>
> To
> [EMAIL PROTECTED]  Time  17:30
>
>
>   Copy to (bcc: Simon Wilcox/BASE/WilliamsLea)
>
>   Bcc Simon Wilcox/BASE/WilliamsLea
>
>   Fax to
>
>   Subject   Session data disappearing
>
> Hi everyone, I'm sure this is a simple problem...
>
> Im using Session.pm to track information between httpd requests.
> However, when I store some information in the session, it is gone when I
> try to retrieve it later.  I've noticed the following things:
>
> when I tie to the session I use the command Commit = 1, but in my
> error_log, I get the following...
> Commit ineffective with AutoCommit enabled at
> /usr/lib/perl5/site_perl/5.005/Apache/Session/Store/Postgres.pm line 92
>
> Then I turned AutoCommit off on my database connection but then I could
> see in my error_log that the commands were being rolled back.
>
> I'll try committing the changes to the database next, but then what's
> the point of the Commit = 1 command in the Tie command?? The
> documentation states it has to be like this. Does anyone know what the
> proper way of doing this is?
>
> Also, thanks to all who replied to my last post!!!  As you can see I'm
> now up and running with Mod_perl
>
> Chris
>
>   
>   Name: att1.htm
>att1.htm   Type: Hypertext Markup Language (text/html)
>   Encoding: base64
>Description: Internet HTML
>
>   
>
> __
>
>This email contains proprietary information some or all of which may be
>legally privileged.  It is for the intended recipient only. If an
addressing
>or transmission error has misdirected this email, please notify the author
by
>replying to this email. If you are not the intended recipient you must not
>use, disclose, distribute, copy, print, or reply on this email.










__


   This email contains proprietary information some or all of which may be
   legally privileged.  It is for the intended recipient only. If an addressing
   or transmission error has misdirected this email, please notify the author by
   replying to this email. If you are not the intended recipient you must not
   use, disclose, distribute, copy, print, or reply on this email.





Apache::Log (v1.01) doesn't function on linux

2000-10-31 Thread Pete Nelson

I can't seem to get Apache::Log to work under linux.  I'm calling it as
'use Apache::Log();', and I can see the module as
/usr/lib/perl5/site_perl/5.005/i386-linux/Apache/Log.pm, but it won't
load.  Are other people having this problem as well?

Perl version: 5.005
mod_perl version: 1.24

error message:
[Tue Oct 31 09:43:53 2000] [error] Can't locate loadable object for
module Apache::Log in @INC (@INC contains:
/usr/local/apache/libexec/perl /usr/lib/perl5/5.00503/i386-linux
/usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux
/usr/lib/perl5/site_perl/5.005 . /usr/local/apache/
/usr/local/apache/lib/perl) at
/usr/lib/perl5/site_perl/5.005/i386-linux/mod_perl.pm line 65535

Thanks for your help!

--
Pete Nelson - Subjex.com
mailto:[EMAIL PROTECTED]  http://www.subjex.com

The next generation search engine! TRY IT!

Corp HQ: 612-362-9224
Toll Free: 800-447-0607
Cell: 612-991-8190
Fax: 612-362-9227
43 Main Street SE, Suite 508
Minneapolis, MN  55414






Re: Apache::Log (v1.01) doesn't function on linux

2000-10-31 Thread Mike Miller


PN> I can't seem to get Apache::Log to work under linux.  I'm calling it as
PN> 'use Apache::Log();', and I can see the module as
PN> /usr/lib/perl5/site_perl/5.005/i386-linux/Apache/Log.pm, but it won't
PN> load.  Are other people having this problem as well?

How about:

use Apache::Log;

not

PN> 'use Apache::Log();'

Brgds,

Mike.





RE: Apache::Log (v1.01) doesn't function on linux

2000-10-31 Thread Geoffrey Young

you need to make mod_perl with 

perl Makefile.PL EVERYTHING=1 

(or at least PERL_LOG_API=1)

HTH

--Geoff

> -Original Message-
> From: Pete Nelson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 31, 2000 11:44 AM
> To: [EMAIL PROTECTED]
> Subject: Apache::Log (v1.01) doesn't function on linux
> 
> 
> I can't seem to get Apache::Log to work under linux.  I'm 
> calling it as
> 'use Apache::Log();', and I can see the module as
> /usr/lib/perl5/site_perl/5.005/i386-linux/Apache/Log.pm, but it won't
> load.  Are other people having this problem as well?
> 
> Perl version: 5.005
> mod_perl version: 1.24
> 
> error message:
> [Tue Oct 31 09:43:53 2000] [error] Can't locate loadable object for
> module Apache::Log in @INC (@INC contains:
> /usr/local/apache/libexec/perl /usr/lib/perl5/5.00503/i386-linux
> /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux
> /usr/lib/perl5/site_perl/5.005 . /usr/local/apache/
> /usr/local/apache/lib/perl) at
> /usr/lib/perl5/site_perl/5.005/i386-linux/mod_perl.pm line 65535
> 
> Thanks for your help!
> 
> --
> Pete Nelson - Subjex.com
> mailto:[EMAIL PROTECTED]  http://www.subjex.com
> 
> The next generation search engine! TRY IT!
> 
> Corp HQ: 612-362-9224
> Toll Free: 800-447-0607
> Cell: 612-991-8190
> Fax: 612-362-9227
> 43 Main Street SE, Suite 508
> Minneapolis, MN  55414
> 
> 
> 



Re: ApacheCon report

2000-10-31 Thread Bill Moseley

At 04:13 PM 10/31/00 +0800, Gunther Birznieks wrote:
>As a bonus, if you write your app smart with cache directive 
>headers, some of the dynamic content can truly be cached by the front-end 
>server.

Gunther,

Can you give some details?  I have co-branded template driven content that
is dynamically generated, but I allow caching.  Is this and example of what
you mean, or are you describing something else?

Thanks,



Bill Moseley
mailto:[EMAIL PROTECTED]



Re: mod_perl problems..

2000-10-31 Thread Randy Kobes

On Mon, 30 Oct 2000, Michael J. Freeman wrote:
 
> I am trying to get a CGI to run under mod_perl and am getting weird
> errors. This CGI trys to use the GD module to create dynamic png's on
> demand (14all.cgi for RRDtool/MRTG-2) and everytime I run it under
> mod_perl I get errors like this:
> 
> [Mon Oct 30 13:05:08 2000] [notice] child pid 336 exit signal Segmentation
> Fault
>  (11)
> libpng error: Application must be recompiled; version 1.0.6 was
> incompatible
> 
> When I run it normally with Apache, I get no errors.

Part of the further information that would be helpful is if
the cgi script run under normal Apache (where it works) is 
using the same perl binary as that with which mod_perl was 
built with.

best regards,
randy kobes




Session data disappearing

2000-10-31 Thread cbell

I deleted the Sessions database and recreated it in Postgres and now the
session data is staying!!




mod_perl on specific scripts

2000-10-31 Thread Paonia Ezrine

I have a number of scripts in places other then /perl that I want to use
mod_perl for.  However, I can't turn it on for all scripts in a specific
directory or even a certain extension.  Is there any way to do this or am
I going to need to do a redirect of some sort (anyone have one)?

Thanks,
Paonia




Problem reading content...

2000-10-31 Thread John Soto



Having problem reading POSTed content Am trying to write handler which will
pass content onto MQ. Currently, I have the content as text\plain and not
url-encoded.
Here's my POSTing snippet...

#! /usr/bin/perl -w

use LWP::UserAgent;
use HTTP::Request;

$ua = LWP::UserAgent->new();
$ua->agent("$0/1.0");
$url = "http://tssdatadev.jc.jefco.com/wilco/PutXml/asynch";

$req = new HTTP::Request 'POST',$url;

$req->content_type('text/plain');
#$req->content_type('multipart/form-data');

$req->content_length(33);
$req->content("easter bunny is coming to town...");
$resp = $ua->request($req);
print $resp->as_string;

##

Here's a snippet of the handler. I'm using read() to get the content... I
receive the content-length with no problem, but am unable to read the content.



package WILCO::PutXml;

#use strict "refs";

use Apache::Constants qw(:common);
use Apache::Registry;
use MQSeries;
use CGI;
use Carp;

do 'Constants.pl';
use lib '/apps/lib/perl';
require 'jefco.pm';

sub handler {

  my $r = shift;


# Parse out how I'm being called
  my($method);
  ($method=$r->uri)=~s!^.*/wilco/PutXml/(\w+)!$1!;
  $method =~ s/\?.*//;

# Get my arguments
#  my($http) = new CGI( $r->args || $r->content );
#  my %params = ($r->content, $r->args);


# Autoflush the output buffer
  $| = 1;
  open(XML,">/tmp/xml.log") || die "Cannot create log file: $!\n";


  $r->content_type('text/html');
  $r->header_out('pragma','no-cache');
  $r->send_http_header;


  $r->warn ("\n");
  $r->warn ("\n");
  $r->warn  ("\n");


# setup defaults, and envionment vairiables


  $ENV{MQSERVER} = $MQSERVER;

  my $PutQ = 'QL.WILCO.IN';
  my $GetQ1 = 'QL.WILCO.SYNC.OUT';
  my $GetQ2 = 'QL.WILCO.ASYNC.OUT';

  my $Msg;
  $r->read($Msg, $r->header_in('Content-length'));

  $r->warn ("");
  $r->warn ("");
  $r->warn ("");
  $r->warn ("");
  if (!($Msg)){$r->warn ("");}

I get nothing in $Msg... What am I missing here???

Thanks in advance!



--
Jefferies archives and reviews outgoing and incoming e-mail.  Such may be 
produced at the request of regulators. Sender accepts no liability for 
any errors or omissions arising as a result of  transmission. Use by other than 
intended recipients is prohibited. This is neither an offer nor a 
solicitation of an offer to buy or sell securities. Opinions or estimates 
constitute our best judgment at this time and are subject to change without 
notice. Information upon which this material is based was obtained from 
sources believed to be reliable but has not been verified. Additional 
information is available upon request. Jefferies its affiliates and 
respective directors officers and employees may buy or sell 
securities mentioned as agent or principal. This is for use by 
professional or institutional investors only. No investments or 
services mentioned or described are available to "private 
customers" as defined by the SFA or to anyone in Canada not a "Designated 
Institution". 



Re: mod_perl on specific scripts

2000-10-31 Thread Bill Moseley

At 03:31 PM 10/31/00 -0500, Paonia Ezrine wrote:
>I have a number of scripts in places other then /perl that I want to use
>mod_perl for.  However, I can't turn it on for all scripts in a specific
>directory or even a certain extension.  Is there any way to do this or am
>I going to need to do a redirect of some sort (anyone have one)?

How about the  directive.


Bill Moseley
mailto:[EMAIL PROTECTED]



Installation error on make test ... please help if you can

2000-10-31 Thread Shane Reid




Was wanting to add mod_perl so that I could run Apache::ASP, 
but ran into a problem with it.
 
I am configuring it with the Apache 1.3.14, and am running 
into this error:
 
modules/src.Use of uninitialized value at 
modules/src.t line 27.FAILED tests 
3-5    Failed 3/6 tests, 50.00% 
okay
 
Failed Test  Status Wstat Total Fail  Failed  
List of 
failed---modules/src.t 
6    3  50.00%  3-54 tests skipped.httpd 
terminatedhttpd terminated*** Error code 9
 
Stop.
 
I have enabled the suexec wrapper and configured it, 
can suexec be used, I was unclear as to if it could be used and if it was 
being used if some files needed to be modified etc.  Any help on correcting 
this error would be appreciated...
 
Shane


Can't locate object method "new" via package "Cache"

2000-10-31 Thread zeke wu

Hi, all:

I try to test IPC::Cache module. I got the following
error message. Any help will be highly appreciated.

Can't locate object method "new" via package "Cache"
at cache-test.pl line 5.


Zeke Wu

__
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/



Re: hashes and mod_perl

2000-10-31 Thread Perrin Harkins

On Tue, 31 Oct 2000, Scott Alexander wrote:
> Is it in anyway possible to tie the hash once to a dbm file?
> 
> At the moment it is tied every time a script is called. 

There's a whole chapter on this: http://perl.apache.org/guide/dbm.html.

The short answer is that you have to tie the dbm file once in every child,
but only once.

- Perrin




Re: mod_perl on specific scripts

2000-10-31 Thread Paonia Ezrine

> At 03:31 PM 10/31/00 -0500, Paonia Ezrine wrote:
> >I have a number of scripts in places other then /perl that I want to use
> >mod_perl for.  However, I can't turn it on for all scripts in a specific
> >directory or even a certain extension.  Is there any way to do this or am
> >I going to need to do a redirect of some sort (anyone have one)?
> 
> How about the  directive.
> 
> 
> Bill Moseley
> mailto:[EMAIL PROTECTED]
> 

Bill,
this is good in thoery but I have not gotten it to work in practice.

here is the general idea (of what I tried):

SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
PerlSetEnv PERL5LIB /usr/lib/perl5/site_perl/5.6.0

 
I tried a lot of variation as well
thanks
Paonia




Re: mod_perl on specific scripts

2000-10-31 Thread Matthew Byng-Maddick

On 31 Oct 2000, David Hodgkinson wrote:
> Did I just condemn you to learning mod_rewrite? Ooops :-)

You do, of course, know about all the latest patches for this, due to
potential security problems

MBM

-- 
Matthew Byng-Maddick   Home: <[EMAIL PROTECTED]>  +44 20  8981 8633  (Home)
http://colondot.net/   Work: <[EMAIL PROTECTED]> +44 7956 613942  (Mobile)
To err is human, to forgive is against company policy.




Re: mod_perl on specific scripts

2000-10-31 Thread Bill Moseley

At 08:00 PM 10/31/00 -0500, Paonia Ezrine wrote:
>Bill,
>this is good in thoery but I have not gotten it to work in practice.
>
>here is the general idea (of what I tried):
>



And you can use it within a  to limit its reach.

http://httpd.apache.org/docs/mod/core.html#files



Bill Moseley
mailto:[EMAIL PROTECTED]



Re: ApacheCon report

2000-10-31 Thread Gunther Birznieks

At 10:43 AM 10/31/2000 -0800, Bill Moseley wrote:
>At 04:13 PM 10/31/00 +0800, Gunther Birznieks wrote:
> >As a bonus, if you write your app smart with cache directive
> >headers, some of the dynamic content can truly be cached by the front-end
> >server.
>
>Gunther,
>
>Can you give some details?  I have co-branded template driven content that
>is dynamically generated, but I allow caching.  Is this and example of what
>you mean, or are you describing something else?

No, that should be all you need. If you don't turn off caching, mod_proxy 
is a caching proxy even in reverse proxy mode. So if you support caching, 
then that should be a bonus for you!







Re: Installation error on make test ... please help if you can

2000-10-31 Thread Joshua Chamas

> Shane Reid wrote:
> 
> Was wanting to add mod_perl so that I could run Apache::ASP, but ran into a problem 
>with it.
> 
> I am configuring it with the Apache 1.3.14, and am running into this error:
> 
> modules/src.Use of uninitialized value at modules/src.t line 27.
> FAILED tests 3-5
> Failed 3/6 tests, 50.00% okay
> 
> Failed Test  Status Wstat Total Fail  Failed  List of failed
> ---
> modules/src.t 63  50.00%  3-5
> 4 tests skipped.
> httpd terminated
> httpd terminated
> *** Error code 9
> 
> Stop.
> 
> I have enabled the suexec wrapper and configured it, can suexec be used, I was 
>unclear as to if it could be used and if it was being used if some
> files needed to be modified etc.  Any help on correcting this error would be 
>appreciated...
> 

I have run into make test errors before for mod_perl and happily 
ignored them.  Just do a make install and see if anything works.

If you really want to deal with the problem, I would suggest
starting src.t line 27, and look at what's going on there.
Remember to make install the perl stuff before you make test.

-- Joshua

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



Re: ApacheCon report

2000-10-31 Thread Ask Bjoern Hansen

On Mon, 30 Oct 2000, Perrin Harkins wrote:

[...]
> - Don't use a proxy server for doling out bytes to slow clients; just set
> the buffer on your sockets high enough to allow the server to dump the
> page and move on.  This has been discussed here before, notably in this
> post:
> 
> 
>[EMAIL PROTECTED]">http://forum.swarthmore.edu/epigone/modperl/grerdbrerdwul/[EMAIL PROTECTED]
> 
> The conclusion was that you could end up paying dearly for the lingeirng
> close on the socket.

Mr. Llima must do something I don't, because with real world
requests I see a 15-20 to 1 ratio of mod_proxy/mod_perl processes at
"my" site. And that is serving <500byte stuff.
 
-- 
ask bjoern hansen - 
more than 70M impressions per day, 





Re: Apache::ASP question: undefined subroutines

2000-10-31 Thread Joshua Chamas

Carl Lipo wrote:
> 
> Does anyone know what causes these kinds of errors? The 'subroutine' that
> the output is referring to is the name of the page (in this case
> search.htm) that is being loaded and that sits in the content directory --
> there are no real missing subroutines...Maddeningly, if I hit reload
> enough times the page will finally load at some point and then error a few
> reloads later.
> 
> The page (search.htm) sits on an NFS mount (could that be a problem?).
> 
> Errors Output
> 
> 1.Undefined subroutine
> &InterNAP::NFT::_home_staff_carl_htdocs_apps_nft_search_htmxINL called at
> /usr/local/lib/site_perl/Apache/ASP.pm line 1395. ,
>/usr/local/lib/site_perl/Apache/ASP.pm line 1397
> 

Somehow, your perl sub that is the compiled version of a page gets
undefined.  In order to track down the problem, set Debug to -1,
and get me the error_log output ( in a private email ) from 
a fresh server start until the error occurs.  I need to see
how the subroutine is being undefined, and whether Apache::ASP
might be responsible for this.

You can also try my latest dev release to see if that helps,
but I don't think we'll be solving the real problem if we did
that.  What version are you running BTW?

--Joshua

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



Re: ApacheCon report

2000-10-31 Thread Perrin Harkins

On Tue, 31 Oct 2000, Ask Bjoern Hansen wrote:

> On Mon, 30 Oct 2000, Perrin Harkins wrote:
> 
> [...]
> > - Don't use a proxy server for doling out bytes to slow clients; just set
> > the buffer on your sockets high enough to allow the server to dump the
> > page and move on.  This has been discussed here before, notably in this
> > post:
> > 
> > 
>[EMAIL PROTECTED]">http://forum.swarthmore.edu/epigone/modperl/grerdbrerdwul/[EMAIL PROTECTED]
> > 
> > The conclusion was that you could end up paying dearly for the lingeirng
> > close on the socket.
> 
> Mr. Llima must do something I don't, because with real world
> requests I see a 15-20 to 1 ratio of mod_proxy/mod_perl processes at
> "my" site. And that is serving <500byte stuff.

I'm not following.  Everyone agrees that we don't want to have big
mod_perl processes waiting on slow clients.  The question is whether
tuning your socket buffer can provide the same benefits as a proxy server
and the conclusion so far is that it can't because of the lingering close
problem.  Are you saying something different?

- Perrin




Re: Problem with Apache 1.3.14, mod_perl, ActiveState Perl on Win2000

2000-10-31 Thread Randy Kobes

On Sat, 28 Oct 2000, Fred Lovine wrote:

> Hi,
> 
> Though I'm no Apache pro (yet) it seems that there is a problem with the
> mod_perl for Win32 ActiveState Perl. I'm using Apache 1.3.14 and am getting
> server errors when running the sample code for Apache::ASP.
> 
> The problem seems to be when a .htaccess file is involved. When the settings
> in .htaccess are moved to httpd.conf, the problem goes away. (And I have
> "AllowOverride All" for the given directory.)
> 
> This problem should be easy for anyone to duplicate, just try running the
> Apache::ASP examples. Also, I did some tracing to verify my config and the
> Apache::ASP handler is being called, but the request object is not quite
> right.
> 
> I am also running Windows 2000 Server, if that matters.
> 
> Anyway, thanks for all the hard work every one has done on apache and perl.
> Both are excellent products.
> 
> Fred Lovine
> [EMAIL PROTECTED]
> 

Hi,
   What sort of errors are you getting? And with what script(s)?
I just tried the site/eg scripts in Apache-ASP-2.03 with the 
ActivePerl ppm package (on apache_1.3.14), and they all seemed to
work. My httpd.conf has the entries


   AllowOverride All
   Option None


with the default .htaccess file included in site/eg placed
in /Apache/htdocs/asp.

best regards,
randy kobes




Re: ApacheCon report

2000-10-31 Thread Ask Bjoern Hansen

On Tue, 31 Oct 2000, Perrin Harkins wrote:

> > [...]
> > > 
>[EMAIL PROTECTED]">http://forum.swarthmore.edu/epigone/modperl/grerdbrerdwul/[EMAIL PROTECTED]
> > 
> > Mr. Llima must do something I don't, because with real world
> > requests I see a 15-20 to 1 ratio of mod_proxy/mod_perl processes at
> > "my" site. And that is serving <500byte stuff.
> 
> I'm not following.  Everyone agrees that we don't want to have
> big mod_perl processes waiting on slow clients.  The question is
> whether tuning your socket buffer can provide the same benefits
> as a proxy server and the conclusion so far is that it can't
> because of the lingering close problem.  Are you saying
> something different?

No.

Maybe I misunderstood the url quoted above.

Reminds me; would it make sense to put code like what's in
mod_proxy_add_forward.c in the mod_perl distribution?


 - ask

-- 
ask bjoern hansen - 
more than 70M impressions per day, 





Re: ApacheCon report

2000-10-31 Thread Les Mikesell


- Original Message - 
From: "Perrin Harkins" <[EMAIL PROTECTED]>
To: "Ask Bjoern Hansen" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, October 31, 2000 8:47 PM
Subject: Re: ApacheCon report


> > Mr. Llima must do something I don't, because with real world
> > requests I see a 15-20 to 1 ratio of mod_proxy/mod_perl processes at
> > "my" site. And that is serving <500byte stuff.
> 
> I'm not following.  Everyone agrees that we don't want to have big
> mod_perl processes waiting on slow clients.  The question is whether
> tuning your socket buffer can provide the same benefits as a proxy server
> and the conclusion so far is that it can't because of the lingering close
> problem.  Are you saying something different?
> 

A tcp close is supposed to require an acknowledgement from the
other end or a fairly long timeout.  I don't see how a socket buffer
alone can change this.Likewise for any of the load balancer
front ends that work on the tcp connection level (but I'd like to
be proven wrong about this).

  Les Mikesell
[EMAIL PROTECTED]





Re: Apache 1.3.12,SuExec,Apache::Registry and CGI problemsi

2000-10-31 Thread Antti Linno



On Tue, 31 Oct 2000, G.W. Haywood wrote:

> Hi there,
> 
> On Tue, 31 Oct 2000, Antti Linno wrote:
> 
> > SuSE Linux 6.4 (i386), Kernel 2.2.14 (i686)
> > The Apache WWW Server Apache/1.3.12 (Unix) (SuSE/Linux)
> > mod_perl/1.21, PHP/4.0b4pl1, mod_ssl/2.6.2, OpenSSL/0.9.5, SuExec option
> > 
> > Ok cgi now seemingly works, but as search results I get the wierdest
> > answers
> 
> I read your post a few times but I still do not understand exactly
> what is the problem.
> 
> Can you write it more clearly?
> 
> 73,
> Ged.

Sorry about the fuzzyness, but what I ment was, my cgi is not working
properly(after post I get the answers for some old search word, not the
one I sent to cgi) and I'm asking advice how to avoid caching or how to
alter configuration so that I wouldn't need Apache::Registry and other
stuff, but still
execute cgi scripts.

Hm, if u would like to see it yourself check out
http://www.betoonelement.ee
There is a small input field in the upper frame, enter search word in it,
and be prepared, though once i got bout 10 times in a row it working
right. Aye, and the page is in aboriginal language :P

Grtngs,
 antti
 





Apache::SSI problem

2000-10-31 Thread Stanislav Grozev

Hi, I am using Apache 1.3.14, mod_perl 1.24_01, perl 5.6 and
Apache::SSI 2.13

in my httpd.conf i have the following:

PerlRequire /usr/local/web/perllib/Apache/tSSI.pm

SetHandler perl-script
PerlHandler Apache::tSSI

AddType text/html .bozo

and the tSSI.pm contains:

package Apache::tSSI;

use strict;
use vars qw(@ISA);

use Apache::SSI;
use Apache::Constants qw(:common OPT_EXECCGI);
use Apache::File;

@ISA = qw(Apache::SSI);

sub ssi_bozo {
my($self, $args) = @_;

return "blah blah";
}

1;


and finaly, one file, named test.bozo contains, among some plain
html the 

the problem is, when I fetch the file, the above remains intact, ie.
the SSI doesn't process it? I've tried also with plain Apache::SSI
directives (ie. without subclassing it) and it still doesn't work.;-(
any suggestions?
(this setup sucessfully runs apache::asp and html::embperl, so i don't
think it is from the mod_perl/apache/perl combo)

any help would be appreciated...

-tacho

--
   [i don't follow] | [http://daemonz.org/ || [EMAIL PROTECTED]]
   [everything should be made as simple as possible, but no simpler]
   0x44FC3339 || [02B5 798B 4BD1 97FB F8DB 72E4 DCA4 BE03 44FC 3339]



Re: Problem reading content...

2000-10-31 Thread Thomas von Elling Skifter Eibner

On Tue, Oct 31, 2000 at 02:54:39PM -0500, John Soto wrote:
> 
> Having problem reading POSTed content Am trying to write handler which will
> pass content onto MQ. Currently, I have the content as text\plain and not
> url-encoded.
> Here's my POSTing snippet...
> 
> #! /usr/bin/perl -w
> 
> use LWP::UserAgent;
> use HTTP::Request;
> 
> $ua = LWP::UserAgent->new();
> $ua->agent("$0/1.0");
> $url = "http://tssdatadev.jc.jefco.com/wilco/PutXml/asynch";
> 
> $req = new HTTP::Request 'POST',$url;
> 
> $req->content_type('text/plain');
> #$req->content_type('multipart/form-data');
> 
> $req->content_length(33);
> $req->content("easter bunny is coming to town...");
> $resp = $ua->request($req);
> print $resp->as_string;

Are you sure you can POST with a content-type of text/plain? I made a little script 
for some automatic form submitting where I did this (fitted in for your needs):

#!/usr/bin/perl -w

use strict;
use LWP::UserAgent;
use HTTP::Request;
use URI::Escape;

my $ua = new LWP::UserAgent;
$ua->agent("$0/1.0");

my $req = new HTTP::Request(POST => 
'http://tssdatadev.jc.jefco.com/wilco/PutXml/asynch');
$req->content_type('application/x-www-form-urlencoded');
$req->content(uri_escape("easter bunny is coming to town...");
my $resp = $ua->request($req);
if ($res->is_success) {
print $req->as_string;
} else {
print "Bad luck this time\n";
}

__END__

Try with this snippet and see how your POST goes..

--
Thomas Eibner


> Here's a snippet of the handler. I'm using read() to get the content... I
> receive the content-length with no problem, but am unable to read the content.
> 
> 
> 
> package WILCO::PutXml;
> 
> #use strict "refs";
> 
> use Apache::Constants qw(:common);
> use Apache::Registry;
> use MQSeries;
> use CGI;
> use Carp;
> 
> do 'Constants.pl';
> use lib '/apps/lib/perl';
> require 'jefco.pm';
> 
> sub handler {
> 
>   my $r = shift;
> 
> 
> # Parse out how I'm being called
>   my($method);
>   ($method=$r->uri)=~s!^.*/wilco/PutXml/(\w+)!$1!;
>   $method =~ s/\?.*//;
> 
> # Get my arguments
> #  my($http) = new CGI( $r->args || $r->content );
> #  my %params = ($r->content, $r->args);
> 
> 
> # Autoflush the output buffer
>   $| = 1;
>   open(XML,">/tmp/xml.log") || die "Cannot create log file: $!\n";
> 
> 
>   $r->content_type('text/html');
>   $r->header_out('pragma','no-cache');
>   $r->send_http_header;
> 
> 
>   $r->warn ("\n");
>   $r->warn ("\n");
>   $r->warn  ("\n");
> 
> 
> # setup defaults, and envionment vairiables
> 
> 
>   $ENV{MQSERVER} = $MQSERVER;
> 
>   my $PutQ = 'QL.WILCO.IN';
>   my $GetQ1 = 'QL.WILCO.SYNC.OUT';
>   my $GetQ2 = 'QL.WILCO.ASYNC.OUT';
> 
>   my $Msg;
>   $r->read($Msg, $r->header_in('Content-length'));
> 
>   $r->warn ("");
>   $r->warn ("");
>   $r->warn ("");
>   $r->warn ("");
>   if (!($Msg)){$r->warn ("");}
> 
> I get nothing in $Msg... What am I missing here???
> 
> Thanks in advance!








Apache 1.3.14 and Apache::RegistryLoader

2000-10-31 Thread Paul G. Weiss

I tried using Apache::RegistryLoader with my
Apache 1.3.14/mod_perl 1.24_2 installation.

I put this in a file that I PerlRequire:

use Apache::RegistryLoader ();

my $perl_dir = Apache->server_root_relative."docs";
my $cmd = qq{find $perl_dir -follow \\( -name "*.pl" -o -name "*.cgi" \\)
-print};
my $output = `$cmd`;
my @files = split /\s+/, $output;
my $rl = Apache::RegistryLoader->new;
foreach my $file (@files)
{
print "pre-loading $file\n";
$file =~ /$perl_dir(.*)/;
my $status = $rl->handler($1, $file);
unless($status == 200) {
warn "pre-load of `$url' failed, status=$status\n";
}
}

(In other words, I load every .cgi or .pl file found under a certain 
directory.  I've also coded it with File::Find instead of running
find as a separate process with the same results.)

The results were not good.  This appeared in error_log:

[Tue Oct 31 15:26:32 2000] [notice] caught SIGTERM, shutting down
signal fault in critical section
signal number: 11, signal code: 1, fault address: 0x1a5c, 
   pc: 0xff3b9c64, sp: 0xffbef530
libthread panic: fault in libthread critical section (PID: 19927 LWP 1)
stacktrace:
ff3b9c30
ff3be3a0
ff3bd498
ff3bd4f4
4bfd8
fedc185c
fedc189c
1c2c4
199fc
329f0
33808
18e98
0

This is under Solaris 2.7.  The perl that I used for mod_perl was not
built with any threading options.  Is this now required, given that 
Apache 1.3.14 appears to be using threads?

-Paul 




Re: mod_perl on specific scripts

2000-10-31 Thread David Hodgkinson

Paonia Ezrine <[EMAIL PROTECTED]> writes:

> I have a number of scripts in places other then /perl that I want to use
> mod_perl for.  However, I can't turn it on for all scripts in a specific
> directory or even a certain extension.  Is there any way to do this or am
> I going to need to do a redirect of some sort (anyone have one)?

I trust you've set up a thin apache at the front? Then it's easy to
pass only the scripts you want back to the mod_perl server.

Did I just condemn you to learning mod_rewrite? Ooops :-)

Plan B would be to maybe do it by suffix? Can you do that?

-- 
Dave Hodgkinson, http://www.hodgkinson.org
Editor-in-chief, The Highway Star   http://www.deep-purple.com
  Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
  -



RE: Apache 1.3.14 and Apache::RegistryLoader

2000-10-31 Thread Geoffrey Young


I have no idea, but if it helps, here is a snip from my startup.pl

it works just fine on:
1.3.14/perl5.6 (-Dusethreads)/linux(RH6.2)/modperl cvs (1.24_02)
1.3.14/perl5.00503/Solaris/modperl 1.24_01

my $rl = Apache::RegistryLoader->new;

my $dh = DirHandle->new("/usr/local/apache/perl-bin") || die $!;

foreach my $file ($dh->read) {
  next unless $file =~ m/\.pl$|\.cgi$/;
  print "pre-loading $file\n";

  $rl->handler("/perl-bin/$file" => "/usr/local/apache/perl-bin/$file");
}

although hardcoded, I've never had a problem with it and it...

HTH

--Geoff

> -Original Message-
> From: Paul G. Weiss [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 31, 2000 3:37 PM
> To: '[EMAIL PROTECTED]'
> Subject: Apache 1.3.14 and Apache::RegistryLoader
> 
> 
> I tried using Apache::RegistryLoader with my
> Apache 1.3.14/mod_perl 1.24_2 installation.
> 
> I put this in a file that I PerlRequire:
> 
> use Apache::RegistryLoader ();
> 
> my $perl_dir = Apache->server_root_relative."docs";
> my $cmd = qq{find $perl_dir -follow \\( -name "*.pl" -o -name 
> "*.cgi" \\)
> -print};
> my $output = `$cmd`;
> my @files = split /\s+/, $output;
> my $rl = Apache::RegistryLoader->new;
> foreach my $file (@files)
> {
> print "pre-loading $file\n";
> $file =~ /$perl_dir(.*)/;
> my $status = $rl->handler($1, $file);
> unless($status == 200) {
> warn "pre-load of `$url' failed, status=$status\n";
> }
> }
> 
> (In other words, I load every .cgi or .pl file found under a certain 
> directory.  I've also coded it with File::Find instead of running
> find as a separate process with the same results.)
> 
> The results were not good.  This appeared in error_log:
> 
> [Tue Oct 31 15:26:32 2000] [notice] caught SIGTERM, shutting down
> signal fault in critical section
> signal number: 11, signal code: 1, fault address: 0x1a5c, 
>pc: 0xff3b9c64, sp: 0xffbef530
> libthread panic: fault in libthread critical section (PID: 
> 19927 LWP 1)
> stacktrace:
> ff3b9c30
> ff3be3a0
> ff3bd498
> ff3bd4f4
> 4bfd8
> fedc185c
> fedc189c
> 1c2c4
> 199fc
> 329f0
> 33808
> 18e98
> 0
> 
> This is under Solaris 2.7.  The perl that I used for mod_perl was not
> built with any threading options.  Is this now required, given that 
> Apache 1.3.14 appears to be using threads?
> 
> -Paul 
>