You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Hackett, Jonny E" <jo...@escout.com> on 2000/11/15 21:56:39 UTC

Apache::Sandwich and CGI scripts

Hello, 

I'm attempting to incorporate Apache::Sandwich into a site I'm working on
and I'm having some problems getting sandwich to work with cgi scripts.

What is happening is that it will insert the header just fine, print the
output, but it doesn't finish the final step which should insert the footer.
And I've gone back and tried the hello world example in the documentation
and get the same results.

I've turned on debugging, and here's what shows up in the errorlog:

inserting /mod_perl/cgi_wrapper.pl GET
Use of uninitialized value in split at
/usr/local/lib/perl5/site_perl/5.6.0/Apache/Sandwich.pm line 83.

My httpd.conf has for following settings for the cgi-bin:

<Directory "/www/vhosts/localhost/cgi-bin">
        SetHandler perl-script
        PerlHandler Apache::Registry
        AllowOverride None
        Options +ExecCGI
        Order allow,deny
        Allow from all

        PerlSetVar HEADER "/mod_perl/cgi_wrapper.pl"
        PerlSetVar FOOTER "/wrapper/footer.html"
</Directory>

It's currently running on RH6.2, apache1.3.14, mod_perl 1.24_01,
Apache::Sandwich 2.04.

If you have any insight as to what I'm doing wrong, I'd greatly appreciate
knowing.

Thanks,
Jonny

Re: Apache::Sandwich and CGI scripts

Posted by Vivek Khera <kh...@kciLink.com>.
>>>>> "HJE" == Hackett, Jonny E <jo...@escout.com> writes:

HJE> I'm attempting to incorporate Apache::Sandwich into a site I'm working on
HJE> and I'm having some problems getting sandwich to work with cgi scripts.

What shows up in your error logs?


Did you read the section in the Apache::Sandwich docs about
sandwiching mod_perl programs?  If you are trying to sandwich plain
old CGI's (which it doesn't seem like) then you can set
SandwichHandler to cgi-handler and let it do the work.

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