Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why Do Some CGI Scripts EXEC from HTML and Others Dont

Status
Not open for further replies.

madaxe2

Technical User
Jan 23, 2005
43
US
This CGI script runs when called from html by

HTML
Code:
<!--#exec cgi="CGI_BIN/first.cgi"-->

CGI
Code:
#!/perl/bin/perl -wT

print "Content-type: text/html\n\n";
print "<div style='position: absolute; top: 132; left: 419; width: 43; height: 25'>
<h2>Hello, world!</h2></div>\n";

WHY DOES THAT WORK AND THIS DOES'NT


HTML
Code:
<!--#exec cgi="CGI_BIN/CHECK.cgi"-->


CGI
Code:
#!/Perl/bin/perl -wT

use CGI qw(:standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use strict;

my $query = new CGI;
my $cookieinfo = $query->cookie('mcjeeves.net');

if (!$cookieinfo)
{
 
print $query->redirect("../index.html?error=1");

exit;

}
else
{
print $query->redirect("../homepage.html?error=1");
}

ANY THOUGHTS or betterways to do this

MADAXE
 
I believe you should be using:

<!--#include virtual="CGI_BIN/CHECK.cgi"-->
 
Could be what Kevin said, or it could be CHECK.cgi might be check.cgi??

--Paul

cigless ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top