Re: Prob with configuring CGI.

2001-03-29 Thread Owen Boyle

Vikram Hari Deshmukh wrote:
 
 Well I have started with CGI, 2 days back. But some aspects makes me confused.
 I am having Apache server over Redhat linux 6.2.

I'm a bit confused too... You mention CGI but you posted to a mod_perl
list. Are you using mod_perl? 

To run plain old CGI programs (using an external perl interpreter), all
you need is:

Directory /home/httpd/cgi-bin
  Allow from all
/Directory
Options +ExecCGI
ScriptAlias /cgi /home/httpd/cgi-bin

call it with http://my_domain/cgi/my_prog

To run CGIs under mod_perl (using the mod_perl interpreter), with
one-shot persistence (i.e. script executes then exits) use
Apache::PerlRun;  

Directory /home/httpd/perl-run
Allow from all
/Directory
Alias /perl-run/  /home/httpd/perl-run/
Location /perl-run
  SetHandler  perl-script
  PerlHandler Apache::PerlRun
  Options +ExecCGI
/Location

call it with http://my_domain/perl-run/my_prog

To run CGIs under mod_perl but with persistence (i.e. the interpreter
stays loaded and global variables remain set) use Apache::Registry;  

Directory /home/httpd/perl
Allow from all
/Directory
Alias /perl/  /home/httpd/perl/
Location /perl
  SetHandler  perl-script
  PerlHandler Apache::Registry
  Options +ExecCGI
/Location

call it with http://my_domain/perl/my_prog

You can also write your own handlers in mod_perl but that's quite a way
from CGI - I don't think that's what you're trying to do...

Rgds,

Owen Boyle.



Apache::Session::Postgres Segmentation Fault

2001-03-29 Thread Victor Michael Blancas

I'm using Apache::Session::Postgres with Apache::ASP.
I'm getting a Segmentation Fault whenever I do a $dbh-disconnect at the
end of the script.  When I comment out the the $dbh-disconnect however, I
don't get any errors.  Having a script without a $dbh-disconnect at the
end is wrong isn't it.  Anyone encountered this before?

Thanks.

-- 
Mike




Apache::Session::Postgres Segmentation Fault Addendum

2001-03-29 Thread Victor Michael Blancas

I'm using Apache::Session::Postgres with Apache::ASP.
I'm getting a Segmentation Fault whenever I do a $dbh-disconnect at the
end of the script.  When I comment out the the $dbh-disconnect however, I
don't get any errors.  Having a script without a $dbh-disconnect at the
end is wrong isn't it.  Anyone encountered this before?

I just tested it as a simple perl script on the command line. I'm still
getting a core dumped Segmentation Fault whenever I do a disconnect at the
end of the script.




Re: mod_perl based Authentication ...

2001-03-29 Thread Michael Smith

The modperl book should help a lot.

Try this:

http://www.modperl.com/book/chapters/ch6.html

Mike



- Original Message - 
From: "Sumit Babu" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 28, 2001 5:10 PM
Subject: mod_perl based Authentication ...


 Hi,
 I am very new to mod_perl, and would like to know
 if there are any pointers that provide help/examples
 for authentication for web sites. Although I am
 familiar with the cgi scripting, I have not written
 any kind of authentication on my own. So, if somebody
 can give some good pointers to this it will be of
 great help to me. 
 
 Thanks for your time and help. I have joined this list
 of-late and I am sorry if this is answered earlier.
 
 Regards,
 
 Sumit/
 
 __
 Do You Yahoo!?
 Get email at your own domain with Yahoo! Mail. 
 http://personal.mail.yahoo.com/?.refer=text
 




RE: mod_perl BOF

2001-03-29 Thread Geoffrey Young



 -Original Message-
 From: Matt Sergeant [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 29, 2001 1:41 AM
 To: Dave Rolsky
 Cc: mod_perl list
 Subject: Re: mod_perl BOF
 
 
 On Wed, 28 Mar 2001, Dave Rolsky wrote:
 
  Why was this scheduled during Matt Sergeant's AxKit presentation?
  
  Why not during a time slot when there are no mod_perl presentations?
  
  This is not rocket science here.
 
 I'm creating my own "Beer BOF", every night in the hotel bar. 
 You and Stas
 (and any other non-drinkers) are welcome, of course :-)

speaking of which, is there a meeting place for tuesday night?

 
 -- 
 Matt/
 
 /||** Founder and CTO  **  **   http://axkit.com/ **
//||**  AxKit.com Ltd   **  ** XML Application Serving **
   // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
  // \\| // ** mod_perl news and resources: http://take23.org  **
  \\//
  //\\
 //  \\
 



RE: mod_perl BOF

2001-03-29 Thread Matt Sergeant

On Thu, 29 Mar 2001, Geoffrey Young wrote:

 speaking of which, is there a meeting place for tuesday night?

That's a no-brainer. The hotel bar!

(I'm not really obsessed with beer, honest guvnor)

-- 
Matt/

/||** Founder and CTO  **  **   http://axkit.com/ **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
 \\//
 //\\
//  \\




Re: Efficient pre-loading of symlinks and virtual directories

2001-03-29 Thread Stas Bekman

On Mon, 26 Mar 2001, Fredrik Sjoholm wrote:


 It's well known that Apache::Registry will load and compile the same
 script multiple times when a site contains Apache::Registry scripts in
 mutliple directories, symlinked and aliased to different URLs (perhaps as
 a means of different levels of access restriction to the same scripts).

 An easy (and efficient) way of avoiding this is to map the virtual Apache
 perl module name to the underlying file's inode#, instead of its URL.
 As an extra bonus, this makes pre-loading scripts a breeze, because you
 no longer need to write a complex translation callback to map between
 filenames and URLs.

It's a refreshing idea. Is this solution cross-platform?

The latest policy is mod_perl-1.3 doesn't accept any new features and
provides only bug fixes. All the development goes into 2.0.

Still you can subclass Apache::PerlRun and provide your own method for
the unique namespace package generation.


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





Re: Efficient pre-loading of symlinks and virtual directories

2001-03-29 Thread Robin Berjon

At 16:57 29/03/2001 +0800, Stas Bekman wrote:
On Mon, 26 Mar 2001, Fredrik Sjoholm wrote:
 An easy (and efficient) way of avoiding this is to map the virtual Apache
 perl module name to the underlying file's inode#, instead of its URL.
 As an extra bonus, this makes pre-loading scripts a breeze, because you
 no longer need to write a complex translation callback to map between
 filenames and URLs.

It's a refreshing idea. Is this solution cross-platform?

No, win32 has no notion of inodes and Cstat always returns 0 for the
inode number, so people running under Apache::Registry there would still
need to use something else to generate the namespace. However, I don't
think that Apache understands win32's "shortcuts" so the original problem
doesn't exist there.

In any case it sure is an interesting idea, and I think it could be used
elsewhere too.

-- robin b.
"What I like about deadlines is the lovely whooshing sound they make as
they rush past." --Douglas Adams




Re: mod_perl BOF

2001-03-29 Thread Stas Bekman

On Thu, 29 Mar 2001, Matt Sergeant wrote:

 On Wed, 28 Mar 2001, Dave Rolsky wrote:

  Why was this scheduled during Matt Sergeant's AxKit presentation?
 
  Why not during a time slot when there are no mod_perl presentations?
 
  This is not rocket science here.

 I'm creating my own "Beer BOF", every night in the hotel bar. You and Stas
 (and any other non-drinkers) are welcome, of course :-)

Only if you bring some fresh cranberry juice and a belly dancer. Yes, the
belly dancer!

Last week I was presenting mod_perl at the Linux World Show in Singapore
and we had a really nice social event with a babe belly dancer... hey,
Gunther was dancing with her... just look at his happy face :)
http://LWN.net/2001/features/Singapore/images/guntherbirznieks-tn.jpg (hi
Gunther) ...don't you regret that you weren't there?

...not talking about me :) the event was a way too short... but that's how
it's in Singapore, they go to sleep early, almost everything gets closed
at 10-11pm :(

Richard Stallman was there but he unfortunately didn't dance :(
The story is here: http://LWN.net/2001/features/Singapore/social.php3
thanks to Elizabeth...

BTW, her name was Francheska... and if you want to have her to dance for
your social event contact [EMAIL PROTECTED] :) and you get an exclusive...

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





Re: mod_perl BOF

2001-03-29 Thread Pierre Phaneuf

Stas Bekman wrote:

 Last week I was presenting mod_perl at the Linux World Show in Singapore
 and we had a really nice social event with a babe belly dancer... hey,
 Gunther was dancing with her... just look at his happy face :)

Man, when I see stuff like that, I know I'm in the right business.

:-))

-- 
Pierre Phaneuf
http://www3.sympatico.ca/pphaneuf/



PerlRestartHandler

2001-03-29 Thread Robin Berjon

Hi,

just out of curiosity, has anyone used PerlRestartHandler ? To what use ? I
don't know what I'd use it for, so I'm wondering whether I'm missing out on
something really cool :)

-- robin b.
The more you run over a dog, the flatter it gets.




Re: PerlRestartHandler

2001-03-29 Thread Stas Bekman

On Thu, 29 Mar 2001, Robin Berjon wrote:

 Hi,

 just out of curiosity, has anyone used PerlRestartHandler ? To what use ? I
 don't know what I'd use it for, so I'm wondering whether I'm missing out on
 something really cool :)

The eagle book says:

PerlRestartHandler points to a routine that is called when the server
is restarted. This gives you the chance to step in and perform any cleanup
required to tweak the Perl interpreter.  For example, you could use this
opportunity to trim the global @INC path or collect statistics about the
modules that have been loaded.

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





Re: Apache::Session::Postgres Segmentation Fault Addendum

2001-03-29 Thread Jeffrey W. Baker



On Thu, 29 Mar 2001, Victor Michael Blancas wrote:

 I'm using Apache::Session::Postgres with Apache::ASP.
 I'm getting a Segmentation Fault whenever I do a $dbh-disconnect at the
 end of the script.  When I comment out the the $dbh-disconnect however, I
 don't get any errors.  Having a script without a $dbh-disconnect at the
 end is wrong isn't it.  Anyone encountered this before?

 I just tested it as a simple perl script on the command line. I'm still
 getting a core dumped Segmentation Fault whenever I do a disconnect at the
 end of the script.

Sounds like a Postgres bug.  Can you hook up GDB and get a stack trace?

-jwb




Re: PerlRestartHandler

2001-03-29 Thread Robin Berjon

At 17:57 29/03/2001 +0800, Stas Bekman wrote:
On Thu, 29 Mar 2001, Robin Berjon wrote:
 just out of curiosity, has anyone used PerlRestartHandler ? To what use ? I
 don't know what I'd use it for, so I'm wondering whether I'm missing out on
 something really cool :)

The eagle book says:

PerlRestartHandler points to a routine that is called when the server
is restarted. This gives you the chance to step in and perform any cleanup
required to tweak the Perl interpreter.  For example, you could use this
opportunity to trim the global @INC path or collect statistics about the
modules that have been loaded.

Ah yes, hadn't spotted that one, thanks Stas (once again...). I thought
about it as a kind of CleanupHandler that doesn't affect the time it takes
for a child to be available for service again (for non per-request cleanups
obviously) but I couldn't think of what could usefully be done there.

-- robin b.
The more you run over a dog, the flatter it gets.




Re: PerlRestartHandler

2001-03-29 Thread Stas Bekman

On Thu, 29 Mar 2001, Robin Berjon wrote:

 At 17:57 29/03/2001 +0800, Stas Bekman wrote:
 On Thu, 29 Mar 2001, Robin Berjon wrote:
  just out of curiosity, has anyone used PerlRestartHandler ? To what use ? I
  don't know what I'd use it for, so I'm wondering whether I'm missing out on
  something really cool :)
 
 The eagle book says:
 
 PerlRestartHandler points to a routine that is called when the server
 is restarted. This gives you the chance to step in and perform any cleanup
 required to tweak the Perl interpreter.  For example, you could use this
 opportunity to trim the global @INC path or collect statistics about the
 modules that have been loaded.

 Ah yes, hadn't spotted that one, thanks Stas (once again...).

That's the benefit you get when you review someone's book. You get the
book's source text :) So I just use grep... after reading the book harcopy
once it's much more useful to have the source for an easy search and
copy-n-paste re-use...

 I thought about it as a kind of CleanupHandler that doesn't affect the
 time it takes for a child to be available for service again (for non
 per-request cleanups obviously) but I couldn't think of what could
 usefully be done there.

Are you writing yet another mod_perl book or something?

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





Re: mod_perl BOF

2001-03-29 Thread Randal L. Schwartz

 "Pierre" == Pierre Phaneuf [EMAIL PROTECTED] writes:

Pierre Stas Bekman wrote:
 Last week I was presenting mod_perl at the Linux World Show in Singapore
 and we had a really nice social event with a babe belly dancer... hey,
 Gunther was dancing with her... just look at his happy face :)

Pierre Man, when I see stuff like that, I know I'm in the right business.

/me jots down notes for Stonehenge TPC5 party

:-)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Re: PerlRestartHandler

2001-03-29 Thread Robin Berjon

At 18:20 29/03/2001 +0800, Stas Bekman wrote:
On Thu, 29 Mar 2001, Robin Berjon wrote:
 Ah yes, hadn't spotted that one, thanks Stas (once again...).

That's the benefit you get when you review someone's book. You get the
book's source text :) So I just use grep... after reading the book harcopy
once it's much more useful to have the source for an easy search and
copy-n-paste re-use...

Indeed, I've often wished O'Reilly would provide book sources for people
that have bought the treebook. Manning has something like that, you can buy
the ebook cheaper than the actual book, and then if you decide to buy the
treebook it's that much cheaper.

/me goes off to read a certain book which he'd promised to review but
hasn't quite finished...

 I thought about it as a kind of CleanupHandler that doesn't affect the
 time it takes for a child to be available for service again (for non
 per-request cleanups obviously) but I couldn't think of what could
 usefully be done there.

Are you writing yet another mod_perl book or something?

Yes, I stole the content from the as yet unpublished Tk and mod_perl books
that I got to review and I'm writing "Applications mod_perl-Tk: le probleme
du monadisme heuristique chez Leibniz, Quine, et Bekman" for the Sorbonne
University Press.

No, in truth I am simply revamping the mod_perl framework we use here to
make it more consistent and logical. I'm trying to put some pieces into the
right phases to avoid some dirty hacks I have to do now. 

Has anyone actually written a PerlRestartHandler ?

-- robin b.
Critic, n.: A person who boasts himself hard to please because nobody tries
to please him.




Re: PerlRestartHandler

2001-03-29 Thread Pierre Phaneuf

Robin Berjon wrote:

 Yes, I stole the content from the as yet unpublished Tk and mod_perl books
 that I got to review and I'm writing "Applications mod_perl-Tk: le probleme
 du monadisme heuristique chez Leibniz, Quine, et Bekman" for the Sorbonne
 University Press.

Ouch! Just reading the titles makes my head hurt! LOL! (I'm french
canadian)

Hmm, Tk from mod_perl, that would be weird. :-)

-- 
Pierre Phaneuf
Systems Exorcist



books reviewing (was Re: PerlRestartHandler)

2001-03-29 Thread Stas Bekman

 Indeed, I've often wished O'Reilly would provide book sources for people
 that have bought the treebook. Manning has something like that, you can buy
 the ebook cheaper than the actual book, and then if you decide to buy the
 treebook it's that much cheaper.

I agree. Meanwhile you can always get the source by helping others to
review books :)

 /me goes off to read a certain book which he'd promised to review but
 hasn't quite finished...

make sure to grab the latest version of the sources though, we have done
lots of small patches in the last days...

I wish others who have promised to help to review the book were actually
helping us :( We gotta release it asap, but the book was hardly touched by
reviewers... I guess we will just release it as it is... don't be
surprised if there will be some glitches in it... what can we do...

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





Odd Can't locate errors

2001-03-29 Thread Robert Landrum

Every once in a while (once a week maybe), I get a string of error 
reports about the following problem

Can't locate auto/CapWiz/Mail/App/handler.al in @INC (@INC
contains:
/usr/local/apache/lib /usr/local/lib/perl5/5.6.0/i686-linux
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/i686-linux
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl . /usr/local/apache/
/usr/local/apache/lib/perl) at /dev/null line 0

The CapWiz::Mail::App has a handler and 99.999% of the time apache 
can find it just fine.  But sometimes apache seems to go a little 
berserk and can't find what it's looking for.  It doesn't happen on 
our development server and restarting apache seems to be the only way 
to fix it.

Has anyone else had these problems in the past?  Is there a fix?

Apache 1.3.12, Perl 5.6.0, mod_perl 1.24_01


Thanks,

Rob


--
Warning: The contents of this message are made of bits which may or may not
be an accurate representation of my thoughts.



Re: PerlRestartHandler

2001-03-29 Thread Matt Sergeant

On Thu, 29 Mar 2001, Robin Berjon wrote:

 At 18:20 29/03/2001 +0800, Stas Bekman wrote:
 On Thu, 29 Mar 2001, Robin Berjon wrote:
  Ah yes, hadn't spotted that one, thanks Stas (once again...).
 
 That's the benefit you get when you review someone's book. You get the
 book's source text :) So I just use grep... after reading the book harcopy
 once it's much more useful to have the source for an easy search and
 copy-n-paste re-use...

 Indeed, I've often wished O'Reilly would provide book sources for people
 that have bought the treebook. Manning has something like that, you can buy
 the ebook cheaper than the actual book, and then if you decide to buy the
 treebook it's that much cheaper.

http://safari.oreilly.com/

-- 
Matt/

/||** Founder and CTO  **  **   http://axkit.com/ **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
 \\//
 //\\
//  \\




Re: PerlRestartHandler

2001-03-29 Thread Robin Berjon

At 18:17 29/03/2001 +0100, Matt Sergeant wrote:
On Thu, 29 Mar 2001, Robin Berjon wrote:
 Indeed, I've often wished O'Reilly would provide book sources for people
 that have bought the treebook. Manning has something like that, you can buy
 the ebook cheaper than the actual book, and then if you decide to buy the
 treebook it's that much cheaper.

http://safari.oreilly.com/

Yes, thanks for the pointer. I had already checked it out but I don't like
the subscription system that much. Perhaps I'll try it one month to give
them a chance, but a priori I prefer the way that Manning did it.

-- robin b.
There's too much blood in my caffeine system. 




Re: Apache::Session::Postgres Segmentation Fault Addendum

2001-03-29 Thread Joshua Chamas

Victor Michael Blancas wrote:
 
 I'm using Apache::Session::Postgres with Apache::ASP.
 I'm getting a Segmentation Fault whenever I do a $dbh-disconnect at the
 end of the script.  When I comment out the the $dbh-disconnect however, I
 don't get any errors.  Having a script without a $dbh-disconnect at the
 end is wrong isn't it.  Anyone encountered this before?
 
 I just tested it as a simple perl script on the command line. I'm still
 getting a core dumped Segmentation Fault whenever I do a disconnect at the
 end of the script.

If you are using Apache::DBI, then dbh-disconnect should not
do anything, so this might get around the problem you are having?

-- Josh

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



Re: Help with Apache::ASP!

2001-03-29 Thread Joshua Chamas

Sean Coyle wrote:
 
 Josh,
 
 I am not entirely sure that is the issue here.  Just to cover off all
 the bases, I am familiar with the FAQ, and several others.  However, it is
 actually not unparsed ASP that I am viewing in the browser output, but
 seemingly partially parsed output.
 

Apache::ASP isn't running the script.  The output you
see at http://admin.worldvibe.org/eg/ is the full source 
code of the script.

There is likely a Directory config that covers the 
DocumentRoot of your web server that sets AllowOverride None,
so having a Directory / doesn't do any good.

It may also be that you haven't copied the .htaccess file
from the distribution ./site/eg.  That's where all the ASP
configs are at.

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



Re: Apache::Session::Postgres Segmentation Fault Addendum

2001-03-29 Thread Matt Sergeant

On Thu, 29 Mar 2001, Victor Michael Blancas wrote:

 I'm using Apache::Session::Postgres with Apache::ASP.
 I'm getting a Segmentation Fault whenever I do a $dbh-disconnect at the
 end of the script.  When I comment out the the $dbh-disconnect however, I
 don't get any errors.  Having a script without a $dbh-disconnect at the
 end is wrong isn't it.  Anyone encountered this before?

 I just tested it as a simple perl script on the command line. I'm still
 getting a core dumped Segmentation Fault whenever I do a disconnect at the
 end of the script.

I've seen segfaults with DBD::Pg if I do a disconnect() and then try and
execute something on that disconnected handle.

Try doing DBI-trace(2) in your command line script to see if something
odd is happening.

-- 
Matt/

/||** Founder and CTO  **  **   http://axkit.com/ **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
 \\//
 //\\
//  \\




Re: mod_perl BOF

2001-03-29 Thread tom

Which hotel?



On Thu, Mar 29, 2001 at 02:55:35PM +0100, Matt Sergeant wrote:
 On Thu, 29 Mar 2001, Geoffrey Young wrote:
 
  speaking of which, is there a meeting place for tuesday night?
 
 That's a no-brainer. The hotel bar!
 
 (I'm not really obsessed with beer, honest guvnor)
 
 -- 
 Matt/
 
 /||** Founder and CTO  **  **   http://axkit.com/ **
//||**  AxKit.com Ltd   **  ** XML Application Serving **
   // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
  // \\| // ** mod_perl news and resources: http://take23.org  **
  \\//
  //\\
 //  \\

-- 
"Computer games don't affect kids. I mean, if Pacman affected us as kids,
we'd all run around in a darkened room munching pills and listening to
repetitive music."



Re: how to prevent ie ( et al ) from resubmitting POST info

2001-03-29 Thread Jeffrey W. Baker



On Thu, 29 Mar 2001 [EMAIL PROTECTED] wrote:

 Anyone have any tricks up their sleeve to prevent the following:
 IE, on opening a new browser windows, or on revisiting through history a
 page which submitted some post data, will re-post that data,
 which causes me problems, as POST triggers my music player window,
 with a random mix from the post parameters.
 Netscape does this too, but only on reload.

 It's tricky to have a flag disallowing reposts, because it's hard to
 differentiate between an accidental one and a real one.

 I guess I'm just wondering if anyone has thought hard about this here.

You oculd put a one-time key in the form values.




Re: how to prevent ie ( et al ) from resubmitting POST info

2001-03-29 Thread tom

Aha! I knew I should have stopped taxing my brain about this one long ago!
The answer is simple: when your head hurts, ask the list.

Thanks very much.

On Thu, Mar 29, 2001 at 10:17:24AM -0800, Jeffrey W. Baker wrote:
 
 
 On Thu, 29 Mar 2001 [EMAIL PROTECTED] wrote:
 
  Anyone have any tricks up their sleeve to prevent the following:
  IE, on opening a new browser windows, or on revisiting through history a
  page which submitted some post data, will re-post that data,
  which causes me problems, as POST triggers my music player window,
  with a random mix from the post parameters.
  Netscape does this too, but only on reload.
 
  It's tricky to have a flag disallowing reposts, because it's hard to
  differentiate between an accidental one and a real one.
 
  I guess I'm just wondering if anyone has thought hard about this here.
 
 You oculd put a one-time key in the form values.

-- 
"Computer games don't affect kids. I mean, if Pacman affected us as kids,
we'd all run around in a darkened room munching pills and listening to
repetitive music."



Re: mod_perl BOF

2001-03-29 Thread Matt Sergeant

On Thu, 29 Mar 2001, [EMAIL PROTECTED] wrote:

 Which hotel?

The Westin Santa Clara - where the conf is being held.




 On Thu, Mar 29, 2001 at 02:55:35PM +0100, Matt Sergeant wrote:
  On Thu, 29 Mar 2001, Geoffrey Young wrote:
 
   speaking of which, is there a meeting place for tuesday night?
 
  That's a no-brainer. The hotel bar!
 
  (I'm not really obsessed with beer, honest guvnor)
 
  --
  Matt/
 
  /||** Founder and CTO  **  **   http://axkit.com/ **
 //||**  AxKit.com Ltd   **  ** XML Application Serving **
// ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
   // \\| // ** mod_perl news and resources: http://take23.org  **
   \\//
   //\\
  //  \\



-- 
Matt/

/||** Founder and CTO  **  **   http://axkit.com/ **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
 \\//
 //\\
//  \\





RE: DBD - Oracle Error connecting to Oracle on HP-UX 11.00 with Apache 1.3.12, mod_perl/1.22, DBI/1.14, DBD(1.06)

2001-03-29 Thread EXT-Sethi, Arun

thanks Geoff, I appreciate your feedback.

is there any bug databse for DBI/DBD on internet where I can serach for of any known 
issues with these on HP-UX 11.0 ?

thanks
Arun



 --
 From: Geoffrey Young[SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, March 28, 2001 05:20
 To:   'EXT-Sethi, Arun'
 Cc:   '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
 Subject:  RE: DBD - Oracle "Error connecting to Oracle"
 
 
 
  -Original Message-
  From: EXT-Sethi, Arun [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, March 27, 2001 10:07 PM
  To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
  Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'; 
  '[EMAIL PROTECTED]'
  Subject: DBD - Oracle "Error connecting to Oracle"
  
  
  Geoff / Daniel,
  
  this is in ref. to your emails (as given below) in the 
  "mod_perl" users group.
  
  I am going through the same errors in my error_log ie
  
  getting:
  Use of inherited AUTOLOAD for non-method 
  DBD::Oracle::ORA_OCI() is deprecated at 
  /oracle/product/9iAS/Apache/perl/lib/site_perl/5.005/PA-RISC2.
  0-thread/DBD/Oracle.pm line 48.
 
 I was never able to figure out that exact error but I think it had something
 to do with DBI trying (unsucessfully) to load DBD::Oracle twice.  That is, I
 would only see it from my log handler after my content handler bombed for
 the other reasons listed in the thread.  In both cases I was just use()ing
 DBI and relying on DBI to pull in DBD::Oracle (however it does that)
 
  
  when I try to connect to oracle from aperl program from the 
  web using DBD::Oracle (1.0.3 as wel as DBD 1.0.6)
  and I have no problem connecting to oracle when I run the 
  perl program from thw shell (command line)
  
  
  It looks like you are on linux platform, and in my case I am 
  on hp-ux 11.0 box.  I am not sure if Daniel is also on linux 
  box or some other box.
 
 I have experience with this on both solaris and linux - the below patch
 helped on both platforms.
 no experience on HP for me, though.
 
 sorry
 
 --Geoff
 
  
  
  I have also tried as follows but that does not help in my case
  
   the short answer/path is to edit DBD::Oracle Makefile.PL and 
  build it again
  
-$::opt_b = 1;   # try to use Oracle's own 'build' rule
+$::opt_b = 0;   # try to use Oracle's own 'build' rule
  
  
  Question:
  
  I would appreciate to know if there is some thing I am 
  missing or if this is some bug in DBD:Oracle (1.03/1.0.6) on 
  HP-UX or any other information that can help me 
  resolve/workaround this problem.
  
  
  
  thanks
  Arun
  
  
  
 [snip]
 



Re: Installing new modules via CPAN?

2001-03-29 Thread G.W. Haywood

Hi there,

On Thu, 29 Mar 2001, Bolt Thrower wrote:

 Can't locate object method "module" via package "Apache" at
 /usr/lib/perl5/site_perl/5.005/Apache/DBI.pm line 202.
 
 It seems that something doesn't like the Apache-module() call, which
 wouldn't be available unless it's actually in a mod_perl environment.  
 
 So how am I supposed to install Apache::AuthCookieDBI via the CPAN
 shell?

You don't have to use the CPAN shell to install, and it will only need
a mod_perl environment to test so you could force the install without
the test.  I think.

For a tiny thing like this I'd just download the tarfile and read the
installation instructions in there.

73,
Ged.




Re: Odd Can't locate errors

2001-03-29 Thread G.W. Haywood

Hi there,

On Thu, 29 Mar 2001, Robert Landrum wrote:

 (once a week maybe), I get a string of error reports
[snip]
 Can't locate auto/CapWiz/Mail/App/handler.al in @INC
[snip]

This puzzles me...

 at /dev/null line 0

Are you getting segfaults?  Running short of memory?
Any other clues?

 The CapWiz::Mail::App has a handler

What and where is it?

 Has anyone else had these problems in the past?

Not I.

 Apache 1.3.12, Perl 5.6.0, mod_perl 1.24_01

Might be worth trying a later Perl in the hope of getting a more
informative/different error message but that's a shot in the dark.

73,
Ged.




Re: Odd Can't locate errors

2001-03-29 Thread Robert Landrum

At 9:37 PM +0100 3/29/01, G.W. Haywood wrote:
Hi there,

On Thu, 29 Mar 2001, Robert Landrum wrote:

 (once a week maybe), I get a string of error reports
[snip]
 Can't locate auto/CapWiz/Mail/App/handler.al in @INC
[snip]

This puzzles me...

 at /dev/null line 0

Are you getting segfaults?  Running short of memory?
Any other clues?

I haven't been seeing any core dumps.  My apache processes are rather 
large to begin with (30MB).  I wish I had more to go on, but all I 
get are the occasional error report to my webmaster account.  It 
seems very odd.


  The CapWiz::Mail::App has a handler

What and where is it?


/usr/local/lib/perl5/site_perl/5.6.0/CapWiz/Mail/App.pm

We (my company) send email to congress (for napster and others). 
CapWiz::Mail::App is the Application that composes and sends all the 
email.

Here is what the handler looks like.  It is the first sub in the App.pm file.

sub handler {
 my $r = shift;
 my $app = CapWiz::Mail::App-new();
 return $app-run($r);
}

We don't do anything weird... I also have a 'use CapWiz::Mail::App;' 
in my startup.pl file.  As far as I can tell, there is no way that 
this could happen on a normally loaded server.  I could see it 
happening on an overloaded server that has too many open files or 
runs out of memory, but our server has neither of these problems.


 Has anyone else had these problems in the past?

Not I.

 Apache 1.3.12, Perl 5.6.0, mod_perl 1.24_01

Might be worth trying a later Perl in the hope of getting a more
informative/different error message but that's a shot in the dark.

Is there any way that it's apache?  I have yet to reproduce it on our 
development server which is Apache 1.3.14, perl 5.6.0, mod_perl 
1.24_01.

I may end up just upgrading the whole system to 1.3.19, 5.6.1, 1.25 
when 5.6.1 is stable...

Thanks,

Rob

--
As soon as you make something foolproof, someone will create a better fool.



Read file at startup, access data during request?

2001-03-29 Thread Richard Anderson

I want to read and parse a file when Apache mod_perl starts and have access to the 
data while my mod_perl methods are processing the request.  The most obvious approach 
(to me) is to put the reading/parsing code at the beginning of my mod_perl module, 
outside of my methods, and load the data into a package array variable that my methods 
can access during request processing.

However, I want to put the pathname of the file (relative to ServerRoot) in the 
httpd.conf file as a PerlSetVar.  I don't see any way to access the value of a 
PerlSetVar until the request phase.  In other words, in the module code that runs at 
startup time, I want to do this:

my $file = $r-server_root_relative($r-dir_config('SharedSecretKeyFile'));

except I don't have the Apache Request object ($r).

Am I completely on the wrong track?  Is there some way to access a PerlSetVar without 
the request object?

Richard Anderson, Ph.D.  www.unixscripts.com
Perl / Java / SQL / Unix   [EMAIL PROTECTED]
Raycosoft, LLC   Seattle, WA, USA




bug in exploder blows up Digest security

2001-03-29 Thread Steven Lembark


anyone know of a way around this?  i have a site that depends heavily on
anchors for delivering reports.  exploder chops off the uri at the
arguments, 
which is not what mod_auth_digest (nor RFC 2617) expect.  

anyone know of a way to force exploder to use the full uri for the
digest
authorization header?  rewrite doesn't seem likely to help since the
hash
was generated with the wrong value of the uri to begin with.

thanx.



GET
/tdrdw/Data?menuform=1report=lookup=report=sar_min_esnlookup=99all=0
HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-powerpoint, application/vnd.ms-excel,
application/msword, application/pdf,
 */*
Accept-Encoding: gzip, deflate
Accept-Language: en-us
Authorization: Digest username="paul", realm="TDRDW", qop="auth",
algorithm="MD5", uri="/tdrdw/Data",
nonce="OsOuHA==3be36661a184a9851d9263409b407031c9fc8
928", nc=0007, cnonce="456ac2f6e01485024bbb49b3652923dc",
response="3f9fe67dfe9188da6a358520d41e1dbe"
Connection: Keep-Alive
Host: alpha:8082
Referer: http://alpha:8082/tdrdw/Menu
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)

HTTP/1.1 (null)




[Thu Mar 29 15:54:58 2001] [error] [client 10.35.2.5] Digest: uri
mismatch - /tdrdw/Data does not match request-uri
/tdrdw/Data?menuform=1report=lo


-- 
 Steven Lembark   2930 W. Palmer St.
 Chicago, IL  60647
 [EMAIL PROTECTED]   800-762-1582



AuthCookieDBI

2001-03-29 Thread ahanuska

I am fairly new to mod_perl and am trying to install AuthCookieDBI to
work with Mysql.  My specifications are as follows:

(everything was recompiled from scratch)

Solaris 8 (sparc)
Apache_1.3.19
mod_perl-1.25
mod_ssl-2.8.1-1.3.19
openssl-0.9.6
Apache-AuthCookie-2.011
Apache-AuthCookieDBI-1.18

The installation went smoothly until I hit the Apache-AuthCookieDBI
module which gives me the following error:

Can't locate object method "module" via package "Apache" at
/usr/local/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 202.

After reading the mod_perl configuration section and loading
Apache::Status before anything else, I still could not install the
module.  As other people have deducted (as far as I could trace it), the

failure originates in the Apache::DBI module.
I checked to make sure that my Apache is configured and loaded with the
correct modules and found everything in good condition.

I have seen this question several times on various newsgroups, but
without resolution.  I apologize in advance if this is a question
duplication and/or a beginner's question.

I would appreciate any help!

Sincerely,

Alex






Anticipated www.modperl.com outage

2001-03-29 Thread Lincoln Stein

Just thought you folks might want to know that www.modperl.com will
probably be unreachable for a day or two.  NorthPoint communications
has gone bankrupt, bringing my DSL connection down with it.  I'm
moving the server to another location for the interim, but it might
take a day or two for the DNS changes to take effect.

Lincoln

-- 

Lincoln D. Stein   Cold Spring Harbor Laboratory
[EMAIL PROTECTED]   Cold Spring Harbor, NY

NOW HIRING BIOINFORMATICS POSTDOCTORAL FELLOWS AND PROGRAMMERS. 
PLEASE WRITE FOR DETAILS.




Re: Apache::Session::Postgres Segmentation Fault Addendum

2001-03-29 Thread Cees Hek

On Thu, 29 Mar 2001, Victor Michael Blancas wrote:

 I'm using Apache::Session::Postgres with Apache::ASP.
 I'm getting a Segmentation Fault whenever I do a $dbh-disconnect at the
 end of the script.  When I comment out the the $dbh-disconnect however, I
 don't get any errors.  Having a script without a $dbh-disconnect at the
 end is wrong isn't it.  Anyone encountered this before?
 
 I just tested it as a simple perl script on the command line. I'm still
 getting a core dumped Segmentation Fault whenever I do a disconnect at the
 end of the script.

I have had this happen to me as well.  You have to make sure that your
session is untied, before the database is disconnected.

What I found was that after pulling some data out of the session, it was
still TIE'ed to the session object.  

ie I with the following

my $userid = $session-{userid};

$userid is pointing into the tied hash, so if the database disappears, and
you try to access $userid, you will get a segfault.

The following program demonstrates this on my system


use strict;
use Apache::Session::Postgres ();
use DBI ();
 
my $dbh = DBI-connect('DBI:Pg:dbname=testdb', undef, undef, 
{ RaiseError = 1, AutoCommit = 0 })
or die "connect: Can't connect to database: $DBI::errstr";
 
tie my %s, 'Apache::Session::Postgres', undef, 
{ 'Handle' = $dbh, 'Commit' = 1 };
 
# Put something in the session and then take it out again
$s{'testing'} = 'Something to put in the session';
my $test = $s{'testing'};

# disconnect from database
$dbh-disconnect;

# Accessing $test again will cause a segfault
print $test, "\n";


I realize that this is bad programming style, since I should untie %s
before I disconnect $dbh, and doing that stops the segfault (it also means
that $test will be blank if it is accessed after the untie).  But I don't
think that this should cause a segfault in the first place.

It sounds like there is a problem in Apache::Session::Postgres but I
haven't had time to search for it...

Cees Hek




Re: Installing new modules via CPAN?

2001-03-29 Thread Victor Michael Blancas

On Thu, 29 Mar 2001, Bolt Thrower wrote:

 I've got a working mod_perl installation on a Linux 2.2.14 /
 Apache/1.3.17 (Unix) mod_perl/1.25 / perl 5.005_03 machine.  I'm trying
 to install Apache::AuthCookieDBI via my CPAN shell, and I keep getting
 errors of the sort:

 Can't locate object method "module" via package "Apache" at
 /usr/lib/perl5/site_perl/5.005/Apache/DBI.pm line 202.

 It seems that something doesn't like the Apache-module() call, which
 wouldn't be available unless it's actually in a mod_perl environment.

 So how am I supposed to install Apache::AuthCookieDBI via the CPAN
 shell?

 Thanks,


`perl -MCPAN -e "install Apache::AuthCookieDBI"`

-- 
Mike




Re: Apache::Session problems

2001-03-29 Thread Christopher L. Everett

Cees Hek wrote:
 
 On Mon, 26 Mar 2001, Christopher L. Everett,,, wrote:
 
  Apache::Session::MySQL won't save session state.
  Apache::Session::File returns the following error:
 
  Insecure dependency in open while running with -T switch at
  /usr/local/lib/perl5/site_perl/5.6.0/Apache/Session/Lock/File.pm
  line 40.
 
 Well, line 40 of Apache/Session/Lock/File.pm contains the following bit of
 code:
 
 
open($fh,"+".$LockDirectory."/Apache-Session-".$session-{data}-{_session_id}.".lock")
 || die $!;D
 
 So perl is telling you that one of the variables being used in the open
 command is Tainted (you are running perl in Taint mode with the -T
 switch turned on).  I'm guessing it is probably
 $session-{data}-{_session_id}, which is really just the $session_id
 variable that you pulled out of a Cookie in your code below (and
 cookies are automatically tainted since it comes from the user).  You will
 have to untaint the $session_id variable before you pass it to
 Apache::Session, and this error message should go away.  See the perl
 manpages on how to untaint variables...
 

Aargh! struck by the blindingly obvious again. I have got to stop 
posting in the early morning ...  I also figured out the next day 
why Apache::Session::MySQL didn't work right, when I investigated
the nature of tied variables a little more closely.  undef'ing the
variable at the end of get_session and re-tying %session at the
beginning of put_or_del_session, plus shuffling some code around 
in get_seesion pretty well solved that problem.  Seemed to me you
can't do something like:

  tie %session, 'Apache::Session::MySQL', undef, \%attrs;
  $self-{session} = %session;

ant then later on do

  %session = $self-{session}

  --Christopher



Re: Installing new modules via CPAN?

2001-03-29 Thread Bolt Thrower

Victor Michael Blancas wrote:
 
 
  So how am I supposed to install Apache::AuthCookieDBI via the CPAN
  shell?
 
  Thanks,
 
 
 `perl -MCPAN -e "install Apache::AuthCookieDBI"`
 

Yes, that was the implied first step that was giving me trouble in the
first place, and the reason for my initial message.  I like using the
CPAN shell to install my perl modules, but I suppose all the Apache
modules I try to install that rely on Apache::DBI will fail their
respective tests.  So, the above command should probably be amended to:
perl -MCPAN -e "force install Apache::AuthCookieDBI"
and hope I don't miss anything important by ignoring the test runs.
-- 
Steve Chadsey [EMAIL PROTECTED]
Now playing: Yearning The Seeds Of A New Dimension
(In The Woods... - "Heart Of The Ages")