RE: SSI and mod_perl

2002-08-28 Thread Narins, Josh

Wouldn't $r-push_handlers($hook,\handler) do the trick, also?

$r-push_handlers(PerlCleanupHandler,\oh_you_wanted_a_C_module);



-Original Message-
From: Per Einar Ellefsen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 27, 2002 5:16 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: SSI and mod_perl


At 23:09 27.08.2002, Jay Thorne wrote:
In a mod_perl handler, in the m_p1.x/apache1.3 api, Is there a quick way to
tell apache
I'm done, here's my content, and I want you to run this through
mod_include
before you send it to the user

You might want to try a filter, for example Apache::OutputChain, see 
http://perl.apache.org/docs/1.0/guide/modules.html#Apache__OutputChainCh
ain_Stacked_Perl_Handlers 
and the Apache::OutputChain manpage formore information. The same is true 
for Apache::Filter: 
http://perl.apache.org/docs/1.0/guide/modules.html#Apache__Filter___Alter_th
e_output_of_previous_handlers 
. Both provide approximately the same functionality.


-- 
Per Einar Ellefsen
[EMAIL PROTECTED]



--
This message is intended only for the personal and confidential use of the designated 
recipient(s) named above.  If you are not the intended recipient of this message you 
are hereby notified that any review, dissemination, distribution or copying of this 
message is strictly prohibited.  This communication is for information purposes only 
and should not be regarded as an offer to sell or as a solicitation of an offer to buy 
any financial product, an official confirmation of any transaction, or as an official 
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or 
error-free.  Therefore, we do not represent that this information is complete or 
accurate and it should not be relied upon as such.  All information is subject to 
change without notice.





SSI and mod_perl

2002-08-27 Thread Jay Thorne

In a mod_perl handler, in the m_p1.x/apache1.3 api, Is there a quick way to 
tell apache 
I'm done, here's my content, and I want you to run this through mod_include 
before you send it to the user

-- 
Jay yohimbe Thorne  [EMAIL PROTECTED]
Mgr Sys  Tech, Userfriendly.org




Re: SSI and mod_perl

2002-08-27 Thread Per Einar Ellefsen

At 23:09 27.08.2002, Jay Thorne wrote:
In a mod_perl handler, in the m_p1.x/apache1.3 api, Is there a quick way to
tell apache
I'm done, here's my content, and I want you to run this through mod_include
before you send it to the user

You might want to try a filter, for example Apache::OutputChain, see 
http://perl.apache.org/docs/1.0/guide/modules.html#Apache__OutputChainChain_Stacked_Perl_Handlers
 
and the Apache::OutputChain manpage formore information. The same is true 
for Apache::Filter: 
http://perl.apache.org/docs/1.0/guide/modules.html#Apache__Filter___Alter_the_output_of_previous_handlers
 
. Both provide approximately the same functionality.


-- 
Per Einar Ellefsen
[EMAIL PROTECTED]





Re: SSI and mod_perl

2002-08-27 Thread Jay Thorne

On August 27, 2002 02:16 pm, Per Einar Ellefsen wrote:
 At 23:09 27.08.2002, Jay Thorne wrote:
 In a mod_perl handler, in the m_p1.x/apache1.3 api, Is there a quick way
  to tell apache
 I'm done, here's my content, and I want you to run this through
  mod_include before you send it to the user

 You might want to try a filter, for example Apache::OutputChain, see
 http://perl.apache.org/docs/1.0/guide/modules.html#Apache__OutputChainC
hain_Stacked_Perl_Handlers and the Apache::OutputChain manpage formore
 information. The same is true for Apache::Filter:
 http://perl.apache.org/docs/1.0/guide/modules.html#Apache__Filter___Alter_t
he_output_of_previous_handlers . Both provide approximately the same
 functionality.

Thats close to what I want to do, but as the existing code has its entry 
already in the webserver config.

What I mean is something like $r-next(mod_include); OK;
or items to that effect.

Is there a direct apache api hook I can use to tell the system to call 
mod_include with the current content?


-- 
Jay yohimbe Thorne  [EMAIL PROTECTED]
Mgr Sys  Tech, Userfriendly.org




Re: SSI and mod_perl

2002-08-27 Thread Randy Kobes

On Tue, 27 Aug 2002, Jay Thorne wrote:

 On August 27, 2002 02:16 pm, Per Einar Ellefsen wrote:
  At 23:09 27.08.2002, Jay Thorne wrote:
  In a mod_perl handler, in the m_p1.x/apache1.3 api, Is there a quick way
   to tell apache
  I'm done, here's my content, and I want you to run this through
   mod_include before you send it to the user
 
  You might want to try a filter, for example Apache::OutputChain, see
  http://perl.apache.org/docs/1.0/guide/modules.html#Apache__OutputChainC
 hain_Stacked_Perl_Handlers and the Apache::OutputChain manpage formore
  information. The same is true for Apache::Filter:
  http://perl.apache.org/docs/1.0/guide/modules.html#Apache__Filter___Alter_t
 he_output_of_previous_handlers . Both provide approximately the same
  functionality.
 
 Thats close to what I want to do, but as the existing code has its entry 
 already in the webserver config.
 
 What I mean is something like $r-next(mod_include); OK;
 or items to that effect.
 
 Is there a direct apache api hook I can use to tell the system to call 
 mod_include with the current content?

The Apache-WinBitHack module, available through
http://www.modperlcookbook.org/download/, may do something
similar to what you want - after it's through, it does
   $r-handler('server-parsed');
   return OK;
to let mod_include pick things up from there.

-- 
best regards,
randy kobes




Re: SSI and mod_perl

2002-08-27 Thread Jay Thorne

On August 27, 2002 03:32 pm, Randy Kobes wrote:
  Thats close to what I want to do, but as the existing code has its entry
  already in the webserver config.
 
  What I mean is something like $r-next(mod_include); OK;
  or items to that effect.
 
  Is there a direct apache api hook I can use to tell the system to call
  mod_include with the current content?

 The Apache-WinBitHack module, available through
 http://www.modperlcookbook.org/download/, may do something
 similar to what you want - after it's through, it does
$r-handler('server-parsed');
return OK;
 to let mod_include pick things up from there.

Darn. After reading what handler does, its not quite what I need. It would 
send the whole request to mod_include. as the uri is a virtual one handled 
entirely in the perl module, there's no file for mod_include to jump on.  I 
was trying to avoid Apache::SSI and its brethren, and just jump back into 
mod_include. 

It appears after Yet Another rereading of the apache.pm doc, that since 
mod_perl normally hooks into almost all request phases, this kind of 
functionality is not really there. Its assumed on the part of the mod_perl 
code that if you are in mod_perl you'll want to stay there, not post process 
with other modules.

I'm using mod_gzip and it hooks into a very late phase that mod_perl leaves 
alone. My config includes an item: mod_gzip_item_include   handler 
^perl-script$. Which, if I understand it, instructs gzip to process output of 
that named handler.

I guess I'm kind of asking for a way to tell mod_include to participate after 
the perl handler has returned. And if I understand mod_include, it doesn't 
want to participate that late.

Thanks  for the pointers, all. It looks like I'm stuck with Apache::SSI or 
DIY. Right now I'm DIY, and after getting bitten by a bug I thought I could 
just use mod include and avoid these kind of bugs in the future.


-- 
Jay yohimbe Thorne  [EMAIL PROTECTED]
Mgr Sys  Tech, Userfriendly.org




possible solution for exec cgi SSI in mod_perl

2001-02-25 Thread Surat Singh Bhati

Hi,

I am using lots of exec cgi SSI in my site, all the 
CGI called using exec are written in perl.
!--#exec cgi="standardcgi.cgi"--

I want to take advantage of mod_perl for performance,
but as I know "exec" will run as mod_cgi , not as mod_perl.

Can I use !--#include virtual="modperlscript.pl"-- ?
If above will run, will be run as a sub request.. ? 

Any other better solution to server the page included mod_perl scripts 
SSI in it, without running the subrequest/new process? 

Regards,

-Surat Singh Bhati









Re: possible solution for exec cgi SSI in mod_perl

2001-02-25 Thread Steve Reppucci


If you build modperl with 'perl Makefile.PL EVERYTHING=1' (or, at least
with 'PERL_SSI=1', then your server side includes will have an additional
option that looks like this:

  !--#perl sub="DoSomething"--

This will invoke routine 'DoSomething' when this page is expanded.
You'll need to pre-load your module with a PerlRequire or PerlModule
directive.

You could also use Apache::SSI as the handler to do the same type of
thing. Many details of how this works in the Eagle book.

One warning: mod_perl *must* be built statically for PerlSSI stuff to
work -- if you try to build it dynamically, the build tool prints a
warning that "PerlSSI disabled in DSO build", or something like that.

HTH,
Steve


On Sun, 25 Feb 2001, Surat Singh Bhati wrote:

 Hi,
 
 I am using lots of exec cgi SSI in my site, all the 
 CGI called using exec are written in perl.
 !--#exec cgi="standardcgi.cgi"--
 
 I want to take advantage of mod_perl for performance,
 but as I know "exec" will run as mod_cgi , not as mod_perl.
 
 Can I use !--#include virtual="modperlscript.pl"-- ?
 If above will run, will be run as a sub request.. ? 
 
 Any other better solution to server the page included mod_perl scripts 
 SSI in it, without running the subrequest/new process? 
 
 Regards,
 
 -Surat Singh Bhati
 
 
 
 
 
 

=-=-=-=-=-=-=-=-=-=-  My God!  What have I done?  -=-=-=-=-=-=-=-=-=-=
Steve Reppucci   [EMAIL PROTECTED] |
Logical Choice Software  http://logsoft.com/ |




RE: possible solution for exec cgi SSI in mod_perl

2001-02-25 Thread Jamie Krasnoo

Here's another way around it. You could use HTML::Template in place of SSI.

Jamie

-Original Message-
From: Surat Singh Bhati [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 25, 2001 7:28 AM
To: [EMAIL PROTECTED]
Subject: possible solution for "exec cgi SSI" in mod_perl


Hi,

I am using lots of exec cgi SSI in my site, all the 
CGI called using exec are written in perl.
!--#exec cgi="standardcgi.cgi"--

I want to take advantage of mod_perl for performance,
but as I know "exec" will run as mod_cgi , not as mod_perl.

Can I use !--#include virtual="modperlscript.pl"-- ?
If above will run, will be run as a sub request.. ? 

Any other better solution to server the page included mod_perl scripts 
SSI in it, without running the subrequest/new process? 

Regards,

-Surat Singh Bhati