Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Application developers can seamlessly integrate the Advantage Database install with their application install. Learn the best practices used when setting up silent installs with this seminar.
  #1  
Old April 28th, 2000, 02:35 PM
rtna rtna is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 79 rtna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
I found the document of Apache::Sandwich, http://www.perl.com/CPAN-local/auth...ich-2.04.readme

But I still wonder how to install this module to Apache ?
run the makefile.pl ?

Thanks

Reply With Quote
  #2  
Old April 28th, 2000, 06:00 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
tar -zxvf Apache-Sandwich-2.04.tar.gz
cd Apache-Sandwich-2.04
perl Makefile.PL
make
make install

DONE

note: check Makefile.PL and see if the 1st line is the path to Perl.

Reply With Quote
  #3  
Old April 29th, 2000, 12:21 AM
rtna rtna is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 79 rtna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Result:
[linux]# make install Installing /usr/lib/perl5/site_perl/5.005/Apache/Sandwich.pm
Installing /usr/lib/perl5/man/man3/Apache::Sandwich.3
Writing /usr/lib/perl5/site_perl/5.005/i386-linux/auto/Apache/Sandwich/.pack1
Appending installation info to /usr/lib/perl5/5.00503/i386-linux/perllocal.po

Modify httpd.conf:
<Location /foo>
#any request for /foo and it's document tree
#are run through our Apache::Sandwich::handler
SetHandler perl-script
PerlHandler Apache::Sandwich

#we send this file first
PerlSetVar HEADER "/my_header.html"

#requested uri (e.g. /foo/index.html) is sent in the middle

#we send output of this mod_perl script last
PerlSetVar FOOTER "/perl/footer.pl"
</Location>

[linux]# httpd restart
Syntax error.........httpd.conf
Invalid command 'PerlHandle', perhaps mis-spelled or defined by a module not inclided in the server configuration

What can I do now ?
Thanks

Reply With Quote
  #4  
Old April 29th, 2000, 02:00 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>Syntax error.........httpd.conf
Once it's installed, you should play around with .htacess instead of your httpd.conf.
I remember you were trying to have a rotate banner on the header and with a static footer. So you should set the header to point to your banner script instead.
Example of your .htaccess file in /foo dir:
<Location /foo>
SetHandler perl-script
PerlHandler Apache::Sandwich
PerlSetVar HEADER "/perl/banner.pl"
PerlSetVar FOOTER "/footer.txt"
</Location>

If your httpd.conf is now messed up, you should remove or comment out the new lines you have added and restart the server.
# /path/to/apachectl graceful

Reply With Quote
  #5  
Old April 29th, 2000, 11:40 AM
rtna rtna is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 79 rtna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
I try to use .htaccess and check the document, but .htaccess didn't support the method <Location> and <Directory>.
So ..., it still didn't work.
Then, I found a <Location> state in httpd.conf, list below:
<IfModule mod_perl.c>
Alias /perl/ /home/httpd/perl/
<Location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
</Location>
</IfModule>
That means, <Location> is right in httpd.conf.
Then, I run "httpd -l" to list compiled-in modules, but don't found "Sandwich".
I think, the PerlHandleer error when I restart httpd, maybe came from "Apache can't found the Module Sandwich".
Would you please tell me what can I do ?
Thanks


Reply With Quote
  #6  
Old April 29th, 2000, 03:38 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
So do you have this in your httpd.conf now?
<Location /perl>
SetHandler perl-script
PerlHandler Apache::Sandwich
PerlSetVar HEADER "/banner.pl"
PerlSetVar FOOTER "/footer.txt"
</Location>
Be sure your banner.pl and footer.txt exist there.
>>I run "httpd -l" to list compiled-in modules, but don't found "Sandwich".
Sandwich.pm is a perl module, not an apache module.

Reply With Quote
  #7  
Old April 30th, 2000, 12:08 AM
rtna rtna is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 79 rtna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
ya, the /foo directory has head.html and foot.html, and put this lines in httpd.conf.
Alias /foo/ /home/httpd/html/foo/
<IfModule mod_perl.c>
<Location /foo>
SetHandler perl-script
PerlHandler Apache::Sandwich
PerlSetVar HEADER "/head.html"
PerlSetVar FOOTER "/foot.html"
</Location>
</IfModule>
I can restart httpd, but no action.
If we put this lines in httpd.conf
<Location /perl>
SetHandler perl-script
PerlHandler Apache::Sandwich
PerlSetVar HEADER "/head.html"
PerlSetVar FOOTER "/foot.html"
</Location>
Then show a Invalid command PerlHandler when restart httpd.

Reply With Quote
  #8  
Old May 2nd, 2000, 01:55 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
How does it go right now? If you don't mind to wait me 2 or 3 days, I will try to install that to my web server and give you the exact configuration so to solve the problems.

Reply With Quote
  #9  
Old May 2nd, 2000, 10:31 AM
rtna rtna is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 79 rtna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
It didn't work yet.

And I found RPM on the net. http://linusp.usp.br/rpm2html/CPAN/....01-1.i386.html
But I don't know how to remove Sandwich that I installed before.

And another article on the net. http://www.bitmechanic.com/mail-arc...rrent/0791.html
But I still don't understand how to install Sandwich.


Thank for your help


Reply With Quote
  #10  
Old May 2nd, 2000, 02:58 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Try
cd Apache-Sandwich-2.04
make deinstall

good luck!

Reply With Quote
  #11  
Old May 2nd, 2000, 03:36 PM
rtna rtna is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 79 rtna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
make deinstall
[]# *** No rule to make target 'deinstall'. Stop
Then........How can I remove Sandwich

Reply With Quote
  #12  
Old May 2nd, 2000, 03:55 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Have you tried to remove Sandwich.pm manually?
Can you install 2.01 at all?

Reply With Quote
  #13  
Old May 4th, 2000, 10:12 AM
rtna rtna is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 79 rtna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Ya,
I install the RPM file of Sandwich.
redhat.com tell me, the Sandwich files list are
1. /usr/lib/perl5/man/man3/Apache::Sandwich.3
2. /usr/lib/perl5/site_perl/5.005/Apache/Sandwich.pm
3. /usr/lib/perl5/site_perl/5.005/i386-linux/auto/Apache/Sandwich/.packlist
After install, I can't find the file .packlist

And then, I keep these lines in httpd.conf:
<IfModule mod_perl.c>
Alias /foo/ /home/httpd/html/foo/
<Location /foo>
SetHandler perl-script
PerlHandler Apache::Sandwich
PerlSetVar HEADER "head.html"
PerlSetVar FOOTER "foot.html"
</Location>
</IfModule>
Then ...... no any "sandwich" on the file /home/httpd/html/foo/index.htm

Which directory do I need to put the file "head.html" and "foo.html" on ?
Thanks


Reply With Quote
  #14  
Old May 4th, 2000, 06:56 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>Which directory do I need to put the file "head.html" and "foo.html" on ?
Maybe /home/httpd/html/include so these files don't get sandwiched themselves.
According to the Readme file of Sandwich, you are supposed to put something like this:
1) head.pl
your banner script which doesn't print the closing </body> nor </html> tag.
2) the files to be sandwich are any files in /foo directory.
So you don't need to put any header or footer in these files.
(e.g. the html part without <html><body></body></html> )
3) foot.html
could be as simple as this..
</body>
</html>

Reply With Quote
  #15  
Old May 5th, 2000, 09:08 AM
rtna rtna is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 79 rtna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
My httpd.conf:
<Directory "/home/httpd/html/foo/">
Options +ExecCGI
</Directory>
<IfModule mod_perl.c>
<Location "/home/httpd/html/foo/">
SetHandler perl-script
PerlHandler Apache::Sandwich
PerlSetVar HEADER head.pl
PerlSetVar FOOTER foot.pl
</Location>
</IfModule>
My /home/httpd/html/foo/head.pl
#!/usr/bin/perl
print "Content-Type: text/htmlnn";
print "This is Head...n";
My /home/httpd/html/foo/foot.pl
#!/usr/bin/perl
print "Content-Type: text/htmlnn";
print "This is Foot...n";
Then test head.pl and foot.pl under text mode, it's OK.
[]# httpd restart
............No Sandwich
Would you please tell me why ?

[This message has been edited by rtna (edited May 05, 2000).]

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > How to install Apache::Sandwich ? please


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |