[thelist] CALLING SSI WITHIN CGI

Adrian Fischer hfisher1 at elp.rr.com
Mon, 17 Jan 2000 08:54:25 -0600


Hi List,

I am having some trouble with a cgi I have.  It creates html pages with forms etc and saves
the info. That works fine but I have another cgi for banner ads that I somehow  need to
include within the generated html.  I believe if I make the banner cgi into a subroutine I
should then be able to use "require "banner.cgi"; at the top of the original script.  Thats
the easy part again (I think).  I cant seem to work out how to call the subroutine within
the original.  For instance, if I call the sub "&banner" then I thought I would be able to
do this: <td>&banner</td> and it would call the subroutine (do I hear belly laughs out
there?) It doesnt seem to be that simple.  Perhaps my subroutine isnt right? Do I need to do
something more mystical to call the sub?

Then I did this:
print "<tr><td>foo</td></tr>\n";
{require 'banner.lib'; &banner;}
print " blahblah.....

Ive called it.lib because  have taken other subroutine out of the main script and used
similar to the above to call them as needed rather than run the whole script.  They work
just fine!!!

This however is not from the original script.

now the script calls that sub (banner.lib) and it runs endlessly telling me:

"Can't obtain file lock for ./data.cgi - server busy."

and thats were Im up to.


I can make cgi's work with instructions however I consider myself to perl/cgi illiterate!
This is a first attempt at doing or modifying something significantly from its original
form.

Any and all help would be appreciated.
Did any of the above make sense?

Adrian