Re: Problems with proxying POST?

2000-10-04 Thread Alexander Farber (EED)

Chris Lewis wrote:
 [Given that Stronghold is a bit old, I'm endeavering to build
 Apache/mod_ssl/mod_perl from scratch, but it complains about not being
 able to load Apache.pm...  Is there a step-by-step set of Solaris
 instructions somewhere?]

Maybe following helps:
03ae01c0229b$a33af840$0e4077cc@tabula">http://forum.swarthmore.edu/epigone/modperl/gendkilblul/03ae01c0229b$a33af840$0e4077cc@tabula



Re: Help...

2000-10-04 Thread Nouguier

Christophe wrote:

 I am pretty new with mod_perl and I have the following runtime error :

 Database handle destroyed without explicit disconnect at
 /usr/lib/perl5/site_perl/5.005/i386-linux/Apache/Registry.pm line 144.
 [Tue Oct  3 22:33:58 2000] [error] Can't call method "errstr" on
 unblessed reference at ./libdb.pl line 35.

 What is "unblessed reference" ???

 Before it was working. I do not know why it is not working anymore...
 Here is the code around my line 35...

 ConnexionDB("db_test", "localhost", "user", "password", \$dbh, 1);
 if ($action eq "question"){
 enregistre(\$dbh, $question, $nomdemandeur, $courriel, $location,
 $langue);
 }

 thanks for any help...

hi chistophe
About DBI:
1:When you use DBI, you have to call $dbh-disconnect before the $dbh
goes out of scope to avoid this warning.

2:If you have a running statement ( eg: you've made a "select * from
youtTable" and you've not fetch all rows ) you'll also have to call
$sth-finish before calling $dbh-disconnect()  ) to avoid another
warning







Re: [DIGEST] mod_perl digest 9/24/2000

2000-10-04 Thread Roger Espel Llima

 --
 
   mod_perl digest
  
September 24, 2000 - September 30, 2000
 
 --
 
 Welcome to the first digest of the happenings in the mod_perl world.
 A work in progress, the mod_perl digest hopes to cover important 
 issues to people using mod_perl on a weekly basis.  It may, however,
 evolve into something greater (or lesser) - constructive criticism
 welcome...

Great!  I think this is the best thing that could be done at this point
to increase mod_perl's visibility.

Have you contacted the people at e.g LWN.net, so they can link to the
digest in their "linux ( free software) weekly news"?

-- 
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html



Re: Way it is so copmplicated

2000-10-04 Thread ricarDo oliveiRa

I think someone should tell Mr. "-" (aka 051581324) not to go offtopic. Or at least 
say something intelligent, if you must go offtopic.

--Original Message--
From: Matt Sergeant [EMAIL PROTECTED]
To: - [EMAIL PROTECTED]
Sent: October 2, 2000 7:43:23 AM GMT
Subject: Re: Way it is so copmplicated


On Mon, 2 Oct 2000, - wrote:

 I am developing computer software for more than 30 years.
 Yet not able to install even the minimal support for ASP using APACHE
 on WIN95 platform (which is no doubt,  the most popular in the world).

Not for web serving. Please read the note about Windows on the Apache web
site. Win95 is fundamentally broken for anything more than simple web
serving. Even Microsoft's PWS for Win95 is extremely limited. (I really
had better not be feeding a troll here, I haven't had much coffee yet...)

 I do believe that there are a lot of persons getting salaries from 
 "APACHE ORG". 

I'm sure they wish that were the case. Most of the ASF members have day
jobs.

 Is it not reasonable that some of them are paid by Microsoft to make thinks
 complicated, to slow Linux penetrating  ?

No. Thats a truly unfair and unjust label to pin on these people who have
done incredible work for free. Remember that MS pump millions of dollars
into developing IIS, ASP and VBScript. We don't have $$$, we just use our
desire to "give something back".

 It is the fight for freedom !!!

I'm not sure whether to consider your post a troll or not. It certainly
smells of one. If you have a specific problem with installing Apache::ASP
then why don't you tell us what those problems are, instead of just saying
"Its too hard". Maybe, just maybe, we can help you.

-- 
Matt/

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org

--
./ricarDo oliveiRa
__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup




Re: Way it is so copmplicated

2000-10-04 Thread Gunther Birznieks

The difficulties in using mod_perl are not an offtopic though.

But I agree about the intelligent part. There are certainly clearer ways of 
wording ones frustrations.

At 05:24 AM 10/4/00 -0400, ricarDo oliveiRa wrote:
I think someone should tell Mr. "-" (aka 051581324) not to go offtopic. Or 
at least say something intelligent, if you must go offtopic.

--Original Message--
From: Matt Sergeant [EMAIL PROTECTED]
To: - [EMAIL PROTECTED]
Sent: October 2, 2000 7:43:23 AM GMT
Subject: Re: Way it is so copmplicated


On Mon, 2 Oct 2000, - wrote:

  I am developing computer software for more than 30 years.
  Yet not able to install even the minimal support for ASP using APACHE
  on WIN95 platform (which is no doubt,  the most popular in the world).

Not for web serving. Please read the note about Windows on the Apache web
site. Win95 is fundamentally broken for anything more than simple web
serving. Even Microsoft's PWS for Win95 is extremely limited. (I really
had better not be feeding a troll here, I haven't had much coffee yet...)

  I do believe that there are a lot of persons getting salaries from
  "APACHE ORG".

I'm sure they wish that were the case. Most of the ASF members have day
jobs.

  Is it not reasonable that some of them are paid by Microsoft to make thinks
  complicated, to slow Linux penetrating  ?

No. Thats a truly unfair and unjust label to pin on these people who have
done incredible work for free. Remember that MS pump millions of dollars
into developing IIS, ASP and VBScript. We don't have $$$, we just use our
desire to "give something back".

  It is the fight for freedom !!!

I'm not sure whether to consider your post a troll or not. It certainly
smells of one. If you have a specific problem with installing Apache::ASP
then why don't you tell us what those problems are, instead of just saying
"Its too hard". Maybe, just maybe, we can help you.

--
Matt/

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org

--
./ricarDo oliveiRa
__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup




[JOB] Short-term/repeat development opportunities

2000-10-04 Thread Simon_Wilcox


I'm looking for individuals/companies to undertake short duration tightly scoped
development projects in mod_perl, apache, MySQL  LDAP.

  Williams Lea Group is building it's intranet using these technologies and
  we need a variety of small applications to support various business units.
  I am looking for suppliers who would be interested in working on projects
  such as:

  * Integration proxies to provide single sign-on capabilities to other web
  based applications
  * Survey  feedback systems
  * User directory (extending existing functionality to support self-service
  update of LDAP information)
  * Migration of MS Access databases to MySQL and web-enablement

  Individual projects will range from a few days of Apache configuration to
  a few weeks of bespoke coding.

  Williams Lea is based in London but remote development is a possibility.

  Please contact me directly if you are interested.

  Simon Wilcox
  Intranet Development Manager
  020 7772 4493
  [EMAIL PROTECTED]

  Williams Lea Group
  www.williamslea.com




__


   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: Help with Apache::Status

2000-10-04 Thread Stas Bekman

On Tue, 3 Oct 2000, James Xie wrote:

 
 I try to use Apache::Status to find out memory usage of my perl scripts, I
 configured the system according to the mod_perl guide:
 
 Add the following lines to httpd.conf
 
 Location /perl-status
   SetHandler perl-script
   PerlHandler Apache::Status
   order deny,allow
 /Location
 
  
 PerlSetVar StatusOptionsAll On
 PerlSetVar StatusTerse On
 PerlSetVar StatusTerseSize On
 PerlSetVar StatusTerseSizeMainSummary On
 PerlModule B::TerseSize
 
 I also installed  B-Size-0.04 and Devel-Symdump on the system. I got
 internal server log every time I try to access /perl-status.  This is what
 in the log file:
 
 [Tue Oct  3 15:49:15 2000] [error] [Tue Oct  3 15:49:15 2000] null:
 Undefined su
 broutine Apache::Status::handler called. 
 
 
 If I remove PerlModule B::TerseSize from httpd.conf, I can get to the
 /perl-status page but I got error again when I click on the memory usage
 button. 
 
 What did I miss?

I think I've seen it before, but probably forgot to document it. If I
remember correctly you have to preload one of the modules it uses. May be
B::Terse? 

As for

 PerlSetVar StatusOptionsAll On

turns all the options On, my bad, should fix that. You shouldn't set it
unless you want all the options to be On.

Tell me whether it worked for you and I'll fix the guide accordingly.
Thanks.



 
 
 Thanks
 
 James
 
 



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





RE: [DIGEST] mod_perl digest 9/24/2000

2000-10-04 Thread Geoffrey Young



 -Original Message-
 From: Roger Espel Llima [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 04, 2000 5:09 AM
 To: [EMAIL PROTECTED]
 Cc: Geoffrey Young
 Subject: Re: [DIGEST] mod_perl digest 9/24/2000
 
 
[snip]
 
 Great!  I think this is the best thing that could be done at 
 this point
 to increase mod_perl's visibility.
 
 Have you contacted the people at e.g LWN.net, so they can link to the
 digest in their "linux ( free software) weekly news"?

well, there's nothing to link to for the moment :)

that is, there is no official home for the html version yet.  

I have a tester on my corporate homepage, but am reluctant to publish a link
to it in the digest (or crawlers or whatever) because of issues that may
arise with my employer...

I would like to get space on perl.apache.org, but that depends on someone
with the appropriate level of permissions finding the time to make space,
give me access or post it to the site themselves, make a link, etc...

all good things in time

--Geoff

 
 -- 
 Roger Espel Llima, [EMAIL PROTECTED]
 http://www.iagora.com/~espel/index.html
 



Re: Pointer to a CGI.pm list

2000-10-04 Thread Keith G. Murphy

"Roderick A. Anderson" wrote:
 
 Sorry but I've run out of sources.  (Don't have netnews.)  Is there a
 mailing list for CGI.pm?  I've done all I can by reading the 'the book'
 and searching the net.  Can't find anything like the symtoms I'm seeing.
Actually the problem may be a lack of perl knowledge on my part but it
 manifests itself when using CGI.pm so I have to start there.
 
I take the above to mean that you don't have Usenet access?  Maybe you
could use DejaNews (www.deja.com) to access comp.lang.perl.modules.



Solved, partially - Pointer to a CGI.pm list

2000-10-04 Thread Roderick A. Anderson

I found _my_ error that caused me to send the original message.  It was a
perl thingy.  Now I've got to get with the Camel book to find out if I
can and how to do what I really wanted to do.

Fyi, I was trying to pass the keys of a hash to the -values in a
popup_menu (CGI.pm).  Followed by the hash to the -labels.

   And I just now re-read (for the 10th plus time ) the reference section
on 'popup_menu' in the CGI.pm book and see I could have done it without
all the mucking about I was doing.
   RTFM, Then re-read it!


Thanks to all that offered suggestions and pointers.

Rod
--
Roderick A. Anderson
[EMAIL PROTECTED]   Altoplanos Information Systems, Inc.
Voice: 208.765.6149212 S. 11th Street, Suite 5
FAX: 208.664.5299  Coeur d'Alene, ID 83814




Apache::Session - kludgy workaround?

2000-10-04 Thread Ian Mahuron


If I repeatedly write to:

$session{foo}{bar}

I find that I have to do something like:

$session{smack}++;

to get it to write when the hash is untied.  Is there a better way to do this?

TIA

ian



RE: Apache::Session - kludgy workaround?

2000-10-04 Thread Jerrad Pierce

Reading the directions ;-)

Apache::Session doesn't do any deep checking, if a top level doesn't value
doesn't change
it may not detect the change.

This is why your workaround works...

The offically recommend workaround (I believe) is to keep a timestamp as a
top level value in the hash...

-Original Message-
From: Ian Mahuron [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 04, 2000 2:48 PM
To: ml: mod_perl
Subject: Apache::Session - kludgy workaround?



If I repeatedly write to:

$session{foo}{bar}

I find that I have to do something like:

$session{smack}++;

to get it to write when the hash is untied.  Is there a better 
way to do this?

TIA

ian




Re: Pointer to a CGI.pm list

2000-10-04 Thread Peter J. Schoenster


On 3 Oct 2000, at 14:17, Roderick A. Anderson wrote:

 Sorry but I've run out of sources.  (Don't have netnews.)  Is
 there a mailing list for CGI.pm?  I've done all I can by reading
 the 'the book' and searching the net.  Can't find anything like
 the symtoms I'm seeing.
Actually the problem may be a lack of perl knowledge on my
part but it
 manifests itself when using CGI.pm so I have to start there.

Hi, this is just the mention of another list where Perl and cgi 
is the primary topic.

There is a list which is quite a few degrees less ... umm ... I 
think you get the drift, but the list has some real good people 
on it in addition to total newbies and is actually quite 
friendly to newbies (once TC left :):) ... there was a great 
thread for awhile where TC tried to explain why such and such 
was necessary ... most of the list would not listen). Granted, 
if you are posting to this list you are not a newbie (and in 
fact we try to get people on the cgi-list to just use CGI.pm ... 
although for mod_perl I use other modules) but as I said there 
are some very knowledgeable, helpful members on that list and 
more talk of mod_perl would not hurt.

It is the cgi-list.

Send email to [EMAIL PROTECTED]

subscribe cgi-list

Peter
__
Exercise Your Brain, Read a Book
-- O Crazy Gringo, Ipanema, Brazil



RE: Help with Apache::Status

2000-10-04 Thread James Xie

It seems I forgot to pre-load the Apache::Status module, it works now once I
add the following line in configuration file:

PerlModule Apache::Status; 

I also pre-loaded B::Terse in the startup.pl. 

Thanks
James

-Original Message-
From: Stas Bekman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 04, 2000 5:36 AM
To: James Xie
Cc: [EMAIL PROTECTED]
Subject: Re: Help with Apache::Status 


On Tue, 3 Oct 2000, James Xie wrote:

 
 I try to use Apache::Status to find out memory usage of my perl scripts, I
 configured the system according to the mod_perl guide:
 
 Add the following lines to httpd.conf
 
 Location /perl-status
   SetHandler perl-script
   PerlHandler Apache::Status
   order deny,allow
 /Location
 
  
 PerlSetVar StatusOptionsAll On
 PerlSetVar StatusTerse On
 PerlSetVar StatusTerseSize On
 PerlSetVar StatusTerseSizeMainSummary On
 PerlModule B::TerseSize
 
 I also installed  B-Size-0.04 and Devel-Symdump on the system. I got
 internal server log every time I try to access /perl-status.  This is what
 in the log file:
 
 [Tue Oct  3 15:49:15 2000] [error] [Tue Oct  3 15:49:15 2000] null:
 Undefined su
 broutine Apache::Status::handler called. 
 
 
 If I remove PerlModule B::TerseSize from httpd.conf, I can get to the
 /perl-status page but I got error again when I click on the memory usage
 button. 
 
 What did I miss?

I think I've seen it before, but probably forgot to document it. If I
remember correctly you have to preload one of the modules it uses. May be
B::Terse? 

As for

 PerlSetVar StatusOptionsAll On

turns all the options On, my bad, should fix that. You shouldn't set it
unless you want all the options to be On.

Tell me whether it worked for you and I'll fix the guide accordingly.
Thanks.



 
 
 Thanks
 
 James
 
 



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




Re: Loading modules in Parent??

2000-10-04 Thread Bill Moseley

At 12:04 AM 10/02/00 -0600, Scott Wilson wrote:
I've seen a similar result on an IRIX installation I'm working on. 
Anyone have any ideas?

So did you decide NOT to pre-load modules?



  Scott

Bill Moseley wrote:
 
 Won't someone comment on this post?  That's a chunk of memory!
 
 At 11:46 AM 09/28/00 -0700, Bill Moseley wrote:
 snip
 This is what pmap -x is showing:
 
 Address   Kbytes Resident Shared Private Permissions   Mapped File
   --  --  --  --
 total Kb   19968   185282816   15712  -- preloaded modules
 total Kb   11528   1015226567496  -- not preloaded
 
 It's almost all heap:
  00164000   16376   15256 312   14944 read/write/exec[ heap ]
  0016400075926608 1046504 read/write/exec[ heap ]
 
 Is this an issue just with Solaris or is this expected (and seen) on other
 platforms?
 
 Bill Moseley
 mailto:[EMAIL PROTECTED]



Bill Moseley
mailto:[EMAIL PROTECTED]



Forking in mod_perl?

2000-10-04 Thread David E. Wheeler

Hi All,

Quick question - can I fork off a process in mod_perl? I've got a piece
of code that needs to do a lot of processing that's unrelated to what
shows up in the browser. So I'd like to be able to fork the processing
off and return data to the browser, letting the forked process handle
the extra processing at its leisure. Is this doable? Is forking a good
idea in a mod_perl environment? Might there be another way to do it?

TIA for the help!

David

-- 
David E. Wheeler
Software Engineer
Salon Internet ICQ:   15726394
[EMAIL PROTECTED]   AIM:   dwTheory



RE: Forking in mod_perl?

2000-10-04 Thread Geoffrey Young



 -Original Message-
 From: David E. Wheeler [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 04, 2000 3:44 PM
 To: [EMAIL PROTECTED]
 Subject: Forking in mod_perl?
 
 
 Hi All,
 
 Quick question - can I fork off a process in mod_perl? I've 
 got a piece
 of code that needs to do a lot of processing that's unrelated to what
 shows up in the browser. So I'd like to be able to fork the processing
 off and return data to the browser, letting the forked process handle
 the extra processing at its leisure. Is this doable? Is forking a good
 idea in a mod_perl environment? Might there be another way to do it?

http://perl.apache.org/guide/performance.html#Forking_and_Executing_Subproce
ss

the cleanup phase is also a good place to do extended processing.   It does
tie up the child until the processing finishes, but it at least make the
client think that the response is finished (so that little moving thingy in
netscape stops moving around)

HTH

--Geoff

 
 TIA for the help!
 
 David
 
 -- 
 David E. Wheeler
 Software Engineer
 Salon Internet ICQ:   15726394
 [EMAIL PROTECTED]   AIM:   dwTheory
 



Re: Forking in mod_perl?

2000-10-04 Thread ed phillips

Hi David,

Check out the guide at

http://perl.apache.org/guide/performance.html#Forking_and_Executing_Subprocess

The Eagle book also covers the C API subprocess details on page 622-631.

Let us know if the guide is unclear to you, so we can improve it.

Ed


"David E. Wheeler" wrote:

 Hi All,

 Quick question - can I fork off a process in mod_perl? I've got a piece
 of code that needs to do a lot of processing that's unrelated to what
 shows up in the browser. So I'd like to be able to fork the processing
 off and return data to the browser, letting the forked process handle
 the extra processing at its leisure. Is this doable? Is forking a good
 idea in a mod_perl environment? Might there be another way to do it?

 TIA for the help!

 David

 --
 David E. Wheeler
 Software Engineer
 Salon Internet ICQ:   15726394
 [EMAIL PROTECTED]   AIM:   dwTheory




More mod-perl as DSO on Solaris (Please help)

2000-10-04 Thread Patrick Durusau

Hello,

I am trying to install Apache 1.3.12 with mod_perl 1.24 on Solaris 2.8.
In my most recent attempt, relying on several suggestions from the
archive I have:

(Using gcc 2.92.2 for all compiling.)

Recompiled Perl 5.6.0

sh Configure -Dcc=gcc -Uuselargefiles

Recompiled Apache 1.3.12

 ./configure \
--prefix=/usr/local/apache \
--enable-module=most \
--enable-shared=max

Attempted to recompile mod_perl:

perl Makefile.PL \
USE_APXS=1 \
WITH_APXS=/usr/local/apache/bin/apxs \
EVERYTHING=1
Will configure via APXS (apxs=/usr/local/apache/bin/apxs)
* ERROR *

  Your current configuration will most likely trigger core dumps,
suggestions:
   *) Do not configure mod_perl as a DSO
   *) Rebuild Perl without malloc pollution (Configure -Ubincompat5005)

* ERROR *

Do I really need to recompile Perl yet again? Or can I have mod_perl
build the httpd (assuming someone can point out how to make it configure
Apache for DSO support for other modules)?

I may be impressed once I get mod_perl working but so far it is a long
way from the ease of installing the Apache webserver.

Patrick

--
Patrick Durusau
Director of Research and Development
Society of Biblical Literature
[EMAIL PROTECTED]





A really really weird use for subrequests...

2000-10-04 Thread Luis 'Champs' de Carvalho


Hy, list people.

I'm need build a rewriting proxy module for my apache.  The basic
idea is get a request, turn it on a proxy request as described in the
eagle book @ page 371, rewrite the $request-contents so the client will
come back to me when processing the next request and let apache follow the
content generation process and response phase as it allways do.

I know how to make the transformation to a mod_proxy request.
I also know that the mod_proxy will bring me the right page, so i
simply don't care about this stage.

But i *really* *don't* *know* how to rewrite the response *before*
the mod_proxy sends it back to the client.

Can i make the mod_proxy redirect using a sub-request, and still
have the contents (and headers, and everything else) to let apache handle
the response phase ?

If not, how can i do this weird thing?

thank you all in advance for any ideas!

[]'z!

 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Luis 'Champs' de Carvalho   @@   @@   @@
 SysAdmin at TBN @@   @@   @@
 mail to:[EMAIL PROTECTED] @@  @@
 http://www.tbn.com.br/@@  @@
 Phone: +55(011)3842.9967@@    @@
 "There's no spoon." @@    @@
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=






RE: Forking in mod_perl?

2000-10-04 Thread Jay Jacobs

I was just going to post that url to the guide also... But another option
I've come up with not listed in the guide is to use the *nix "at" command.  
If I need to run some processor intensive application that doesn't need
apache_anything, I'll do a system call to "at" to schedule it to run
(usually I pass in "now").  However, the drawbacks are that it's a
complete seperate process and passing complicated structures isn't worth
the time to think about using at.

Jay

On Wed, 4 Oct 2000, Geoffrey Young wrote:

 
 
  -Original Message-
  From: David E. Wheeler [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, October 04, 2000 3:44 PM
  To: [EMAIL PROTECTED]
  Subject: Forking in mod_perl?
  
  
  Hi All,
  
  Quick question - can I fork off a process in mod_perl? I've 
  got a piece
  of code that needs to do a lot of processing that's unrelated to what
  shows up in the browser. So I'd like to be able to fork the processing
  off and return data to the browser, letting the forked process handle
  the extra processing at its leisure. Is this doable? Is forking a good
  idea in a mod_perl environment? Might there be another way to do it?
 
 http://perl.apache.org/guide/performance.html#Forking_and_Executing_Subproce
 ss
 
 the cleanup phase is also a good place to do extended processing.   It does
 tie up the child until the processing finishes, but it at least make the
 client think that the response is finished (so that little moving thingy in
 netscape stops moving around)
 
 HTH
 
 --Geoff
 
  
  TIA for the help!
  
  David
  
  -- 
  David E. Wheeler
  Software Engineer
  Salon Internet ICQ:   15726394
  [EMAIL PROTECTED]   AIM:   dwTheory
  
 





Re: Forking in mod_perl?

2000-10-04 Thread David E. Wheeler

ed phillips wrote:
 
 Hi David,
 
 Check out the guide at
 
 http://perl.apache.org/guide/performance.html#Forking_and_Executing_Subprocess
 
 The Eagle book also covers the C API subprocess details on page 622-631.
 
 Let us know if the guide is unclear to you, so we can improve it.

Yeah, it's a bit unclear. If I understand correctly, it's suggesting
that I do a system() call and have the perl script called detach itself
from Apache, yes? I'm not too sure I like this approach. I was hoping
for something a little more integrated. And how much overhead are we
talking about getting taken up by this approach?

Using the cleanup phase, as Geoffey Young suggests, might be a bit
nicer, but I'll have to look into how much time my processing will
likely take, hogging up an apache fork while it finishes.

Either way, I'll have to think about various ways to handle this stuff,
since I'm writing it into a regular Perl module that will then be called
from mod_perl...

Thanks,

David



Re: A really really weird use for subrequests...

2000-10-04 Thread Jim Winstead

On Oct 04, Luis 'Champs' de Carvalho wrote:
   Can i make the mod_proxy redirect using a sub-request, and still
 have the contents (and headers, and everything else) to let apache handle
 the response phase ?

no.

   If not, how can i do this weird thing?

take a look at Apache::RewritingProxy.

http://search.cpan.org/search?dist=Apache-RewritingProxy

jim



Re: Forking in mod_perl?

2000-10-04 Thread ed phillips

I hope it is clear that you don't want fork the whole server!

Mod_cgi goes to great pains to effectively fork a subprocess, and
was the major impetus I believe for the development of
the C subprocess API. It  (the source code for
mod_cgi) is a great place to learn some of the
subtleties as the Eagle book points out. As the Eagle book
says, Apache is a complex beast. Mod_perl gives
you the power to use the beast to your best advantage.

Now you are faced with a trade off.  Is it more expensive to
detach a subprocess, or use the child cleanup phase to do
some extra processing? I'd have to know more specifics to answer
that with any modicum of confidence.

Cheers,

Ed


"David E. Wheeler" wrote:

 ed phillips wrote:
 
  Hi David,
 
  Check out the guide at
 
  http://perl.apache.org/guide/performance.html#Forking_and_Executing_Subprocess
 
  The Eagle book also covers the C API subprocess details on page 622-631.
 
  Let us know if the guide is unclear to you, so we can improve it.

 Yeah, it's a bit unclear. If I understand correctly, it's suggesting
 that I do a system() call and have the perl script called detach itself
 from Apache, yes? I'm not too sure I like this approach. I was hoping
 for something a little more integrated. And how much overhead are we
 talking about getting taken up by this approach?

 Using the cleanup phase, as Geoffey Young suggests, might be a bit
 nicer, but I'll have to look into how much time my processing will
 likely take, hogging up an apache fork while it finishes.

 Either way, I'll have to think about various ways to handle this stuff,
 since I'm writing it into a regular Perl module that will then be called
 from mod_perl...

 Thanks,

 David




Re: Forking in mod_perl?

2000-10-04 Thread Billy Donahue

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 4 Oct 2000, ed phillips wrote:

 Now you are faced with a trade off.  Is it more expensive to
 detach a subprocess, or use the child cleanup phase to do
 some extra processing? I'd have to know more specifics to answer
 that with any modicum of confidence.

He might try a daemon coprocesses using some IPC to communicate with
Apache, which is my favorite way to do it..

- --
"The Funk, the whole Funk, and nothing but the Funk."
Linux barcode software mirror: http://dadadada.net/cuecat
Billy Donahue mailto:[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.3 (GNU/Linux)
Comment: pgpenvelope 2.9.0 - http://pgpenvelope.sourceforge.net/

iD8DBQE525yz+2VvpwIZdF0RAjddAJ46Zxa4qHlLJuMfc1FHnS4aa7E7pwCfSFf8
MctjBHbwd8x31CAACVA98Ug=
=B/EE
-END PGP SIGNATURE-




Re: Forking in mod_perl?

2000-10-04 Thread David E. Wheeler

ed phillips wrote:
 
 I hope it is clear that you don't want fork the whole server!
 
 Mod_cgi goes to great pains to effectively fork a subprocess, and
 was the major impetus I believe for the development of
 the C subprocess API. It  (the source code for
 mod_cgi) is a great place to learn some of the
 subtleties as the Eagle book points out. As the Eagle book
 says, Apache is a complex beast. Mod_perl gives
 you the power to use the beast to your best advantage.

Yeah, but I don't speak C. Just Perl. And it looks like the way to do it
in Perl is to call system() and then detach the called script. I was
trying to keep this all nice and tidy in modules, but I don't know if
it'll be possible.

 Now you are faced with a trade off.  Is it more expensive to
 detach a subprocess, or use the child cleanup phase to do
 some extra processing? I'd have to know more specifics to answer
 that with any modicum of confidence.

I think I can probably evaluate that with a few tests.

Thanks!

David



Re: Forking in mod_perl?

2000-10-04 Thread David E. Wheeler

Billy Donahue wrote:

  Now you are faced with a trade off.  Is it more expensive to
  detach a subprocess, or use the child cleanup phase to do
  some extra processing? I'd have to know more specifics to answer
  that with any modicum of confidence.
 
 He might try a daemon coprocesses using some IPC to communicate with
 Apache, which is my favorite way to do it..

Yeah, I was thinking something along these lines. Don't know if I need
something as complex as IPC. I was thinking of perhaps a second Apache
server set up just to handle long-term processing. Then the first server
could send a request to the second with the commands it needs to execute
in a header. The second server processes those commands independantly of
the first server, which then returns data to the browser.

But maybe that's overkill. I'll have to weigh the heft of the
post-request processing I need to do.

Thanks for the suggestion!

David



Re: Forking in mod_perl?

2000-10-04 Thread Neil Conway

On Wed, Oct 04, 2000 at 02:42:50PM -0700, David E. Wheeler wrote:
 Yeah, I was thinking something along these lines. Don't know if I need
 something as complex as IPC. I was thinking of perhaps a second Apache
 server set up just to handle long-term processing. Then the first server
 could send a request to the second with the commands it needs to execute
 in a header. The second server processes those commands independantly of
 the first server, which then returns data to the browser.

In a pinch, I'd just use something like a 'queue' directory. In other
words, when your mod_perl code gets some info to process, it writes
this into a file in a certain directory (name it with a timestamp /
cksum to ensure the filename is unique). Every X seconds, have a
daemon poll the directory; if it finds a file, it processes it.
If not, it goes back to sleep for X seconds. I guess it's poor
man's IPC. But it runs over NFS nicely, it's *very* simple, it's
portable, and I've never needed anything more complex. You also
don't need to fork the daemon or startup a new script every
processing request. But if you need to do the processing in realtime,
waiting up to X seconds for the results might be unacceptable.

How does this sound?

HTH,

Neil

-- 
Neil Conway [EMAIL PROTECTED]
Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc
Encrypted mail welcomed

It is dangerous to be right when the government is wrong.
-- Voltaire

 PGP signature


redirecting large POSTs

2000-10-04 Thread chris

I have an authentication scheme which checks every request for a valid
cookie, and if your session has timed out redirects to a login page. After
logging in, the request is resubmitted as a GET. This works great except
when the original post is large--the redirect URL gets way too long (10K
or more).

I was thinking about saving the posted data to a temporary file and
reading it back in after the login succeeds, but this seems messy and
error-prone. Has anyone else had this problem? Are there any modules
(maybe session mgmt stuff?) that could be easily adapted to handle this?

Thanks,
Chris




Disable/Enable Persistant Connections On Demand

2000-10-04 Thread Mark Kirkwood

Dear List,

This may be a stupid question... but anyway... 

I am using mod_perl with persisent database connections enabled via Apache::DBI.

This works great, because most of the web site uses a "generic" user to connect to the 
database. However I do authentication via the database ( i.e : attempt a connection 
using supplied user/pwd and if so set a cookie and continue on using the generic 
user/pwd) , and these "once only" connections persist too. Thus after 100 folk have 
logged in there are 100 ( unused ) connections. I would like to have these 
authentication once only connection not persist.

Is there any way to "by default" use persistent connections but on occasions not ?

Thanks in advance for your help

Mark





Re: Forking in mod_perl?

2000-10-04 Thread C. Jon Larsen


I use a database table for the queue. No file locking issues, atomic
transactions, you can sort and order the jobs, etc . . . you can wrap the
entire "queue" library in a module. Plus, the background script that
processes the queue can easily run with higher permissions, and you don't
have to worry as much with setuid issues when forking from a parent
process (like your apache) running as a user with less priviledges than
what you (may) need. You can pass all the args you need to via a column in
the db, and, if passing data back and forth is a must, serialize your data
using Storable and have the queue runner thaw it back out. Very simple,
very fast, very powerful.

On Wed, 4 Oct 2000, Neil Conway wrote:

 On Wed, Oct 04, 2000 at 02:42:50PM -0700, David E. Wheeler wrote:
  Yeah, I was thinking something along these lines. Don't know if I need
  something as complex as IPC. I was thinking of perhaps a second Apache
  server set up just to handle long-term processing. Then the first server
  could send a request to the second with the commands it needs to execute
  in a header. The second server processes those commands independantly of
  the first server, which then returns data to the browser.
 
 In a pinch, I'd just use something like a 'queue' directory. In other
 words, when your mod_perl code gets some info to process, it writes
 this into a file in a certain directory (name it with a timestamp /
 cksum to ensure the filename is unique). Every X seconds, have a
 daemon poll the directory; if it finds a file, it processes it.
 If not, it goes back to sleep for X seconds. I guess it's poor
 man's IPC. But it runs over NFS nicely, it's *very* simple, it's
 portable, and I've never needed anything more complex. You also
 don't need to fork the daemon or startup a new script every
 processing request. But if you need to do the processing in realtime,
 waiting up to X seconds for the results might be unacceptable.
 
 How does this sound?
 
 HTH,
 
 Neil
 
 -- 
 Neil Conway [EMAIL PROTECTED]
 Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc
 Encrypted mail welcomed
 
 It is dangerous to be right when the government is wrong.
 -- Voltaire
 







RE: Apache::Session - kludgy workaround?

2000-10-04 Thread Jeffrey W. Baker

On Wed, 4 Oct 2000, Jerrad Pierce wrote:

 Reading the directions ;-)
 
 Apache::Session doesn't do any deep checking, if a top level doesn't value
 doesn't change
 it may not detect the change.
 
 This is why your workaround works...
 
 The offically recommend workaround (I believe) is to keep a timestamp as a
 top level value in the hash...

You may also force saving of a session via:

tied(%session)-make_modified();

There is a complete object interface to Apache::Session but you have to
read Session.pm to explore it.

-jwb




Re: Forking in mod_perl?

2000-10-04 Thread Jim Woodgate


David E. Wheeler writes:
  Using the cleanup phase, as Geoffey Young suggests, might be a bit
  nicer, but I'll have to look into how much time my processing will
  likely take, hogging up an apache fork while it finishes.

I've wondered about this as well.  I really like the cleanup handler,
and thought that in general it would be better to tie up the httpd
process and let apache decide when a new process is needed rather than 
always forking.

For the most part I use the cleanup handlers to handle something that
takes alot of time, but doesn't happen very often.  If I had something
that took alot of time every time someone hit a page I still don't
think I'd fork, instead I'd pass off the information to another
process and let that process run through the data asynchronously like
a spooler...

-- 
[EMAIL PROTECTED]