Re: Using Apache::Sandwich on php files

2001-03-07 Thread Vivek Khera

 "CG" == Clint Gilders [EMAIL PROTECTED] writes:

CG I'm trying to figure out how to "Sandwich" php files.  Is this
CG possible? For my .htm* files I have:

I find it risky to run sandwich on *.htm* files... your header file
itself is a .html file; do you want that sandwiched as well?  I guess
the module protects itself from that, but still, it is unclean.


CG FilesMatch "\.html|htm$"
CG SetHandler perl-script
CG PerlHandler Apache::Sandwich
CG PerlSetVar HEADER "/includes/head.html"
CG PerlSetVar SandwichHandler server_parsed
CG /FilesMatch

CG What would I need to change to have this work for php?

Tell SandwichHandler to run the php handler instead of the
server_parsed handler.  I have never tried it, but theoretically, it
should work, assuming I implemented it correctly ;-)


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED]   Rockville, MD   +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/



Re: Using Apache::Sandwich on php files

2001-03-07 Thread Clint Gilders

Vivek Khera wrote:
 I find it risky to run sandwich on *.htm* files... your header file
 itself is a .html file; do you want that sandwiched as well?  I guess
 the module protects itself from that, but still, it is unclean.

Actually, I changed the extensions of my header and footer files to
.php3 so they wouldn't get sandwiched.  So my perl.conf actually
contains:

FilesMatch "\.html|htm$"
 SetHandler perl-script
 PerlHandler Apache::Sandwich
 PerlSetVar HEADER "/includes/head.php3"
 PerlSetVar FOOTER "/includes/foot.php3"
 PerlSetVar SandwichHandler server_parsed
/FilesMatch

 Tell SandwichHandler to run the php handler instead of the
 server_parsed handler.  I have never tried it, but theoretically, it
 should work, assuming I implemented it correctly ;-)

What would be the sytax of the command to us the php handler (on .php
files) instead of the server-parsed handler?

Thanks
Clint

-- 
Clint Gilders
Servermaster Onlinehobbyist Inc.
[EMAIL PROTECTED]



Re: Using Apache::Sandwich on php files

2001-03-07 Thread Vivek Khera

 "CG" == Clint Gilders [EMAIL PROTECTED] writes:

CG  PerlSetVar SandwichHandler server_parsed

 Tell SandwichHandler to run the php handler instead of the
 server_parsed handler.  I have never tried it, but theoretically, it
 should work, assuming I implemented it correctly ;-)

CG What would be the sytax of the command to us the php handler (on .php
CG files) instead of the server-parsed handler?

The syntax is above.  The name of the handler might just be the same
as how you tell Apache to run .php files through a specific handler.
Just maybe.  Personally, I don't know since I don't use php.