I have Perl/CGI scripts whose output I'd like to include in an SHTML
page.  For instance, foo.shtml should include output from bar.pl (which
is located in the cgi-bin directory).  Server Side Includes (SSI) seem
to be my only option for making this work, unless there's something I'm
missing.  My reasons for wanting to do this are two-fold:

  1. I don't want to have cgi-bin/ in the URLs for the whole friggin'
  site.

  2. The base site already exists, and I don't want to have to change
  the URLs or rewrite everything to run from CGI scripts right away.

The bar.pl script works just fine when called directly from the browser.
If my bar.pl uses Perl::CGI to generate the markup that wraps the Perl
output I want to capture, I can get it to work just fine by calling it
from foo.shtml as long as foo.shtml contains nothing but the following:

  <!--#exec cgi="/cgi-bin/bar.pl" -->

If, however, I have the markup with which I want to wrap my Perl output
defined in foo.shtml, and bar.pl only outputs the stuff that needs to be
dynamically generated by the Perl script, I get this output in my
browser:

  [an error occurred while processing this directive]

Yes, that's it.  That's all the browser has to say.  The bar.pl file is
chmod 755 at the moment, so I don't imagine it's a permissions issue.

As I'm not the most expert user of Perl/CGI and SSI in the world, I'm
afraid I don't much know what's broken or how to get more useful error
information.  I don't have control of webserver configuration in this
case, because I'm setting this up on a cheapo webhosting account without
any shell access.  Even PerlMonks Super Search doesn't seem to offer
anything helpful for me.

This seems like something that should be pretty easy to accomplish, but
I've run out of ideas for the moment.  Aside from asking the list, I'm
also going to try taking a nap.

Thanks in advance for any help.

-- 
Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ]
This sig for rent:  a Signify v1.14 production from http://www.debian.org/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to