Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
<cgi-callout> error
GodBlessMe
Hi,
I'm trying a cgi-callout in the DCT. I've written a simple cgi script
#!/usr/bin/perl
use TeamSite::CGI_lite;
use TeamSite::Config;
print "Content-type:text/html\n\n";
my $cgi = TeamSite::CGI_lite->new();
$cgi->parse_data();
my $item_name = $cgi->{'form'}{'iw_item_name'};
print "<html><head><title>Test CGI</title></head>\n";
print "<body>\n";
print "<script language=\"Javascript\">\n";
print "alert($item_name);\n";
print "</script>\n";
print "<h2>Hello, world!</h2>\n";
print "</body></html>\n";
and I'm getting a Internal Server error when i call it from the DCT. What could be the problem?
The cgi-callout is
cgi-callout url="/interwoven/iw-home/custom/sprint/sales_and_marketing/businesswholesale/testcgi.cgi" label =">>" window-features="width=320,height=200,resizable=yes,toolbar=yes,scrollbars=yes"/>
Any help is greately appreciated...thanks
Find more posts tagged with
Comments
Adam Stoller
I'm not sure with regard to Templating callouts, but I imagine it's the same as other CGI scripts - and that the URL has to point to a file within IWHOME/httpd/iw-bin/ - so instead of:
url="/interwoven/iw-home/custom/sprint/sales_and_marketing/businesswholesale/testcgi.cgi"
You'd put testcgi.cgi into IWHOME/httpd/iw-bin and use:
url="testcgi.cgi"
or possibly:
url="/iw-bin/testcgi.cgi"
--fish
(Interwoven Senior Technical Consultant)
GodBlessMe
The cgi script will not be invoked if its not in iw-bin directory?
Adam Stoller
I believe that to be correct.
It is *possible* that you could put it into a different directory as long as that different directory can be defined as allowing CGI scripts to execute within the web server configuration file. However, I am unsure whether you would have to add this configuration option to the iwwebd configuration, the "customer" web server configuration or both. (if you find out, please pass on the information as it might be useful to others reading these forums).
--fish
(Interwoven Senior Technical Consultant)
CTS_53_Docs.zip
james1
If you are using TeamSite Perl modules, such as TeamSite::CGI_lite, then your she-bang line should point to iwperl, not /usr/bin/perl.
-- James
--
James H Koh
Interwoven Engineering