TS5.5.2 SP3 on Solaris.
I am trying to use the following script in a CGI task and it keeps returning a 500 error. The error_log returns: Premature end of script headers: /opt/teamsite/iw-home/httpd/iw-bin/iw_cgi_wrapper.cgi
I've seen a few threads about this, but they mainly applied to issues with templating.cfg or permissions or premature output. I can run this script fine w/o the wrapper, either from the command line or through the browser.
Can anyone see anything that should interfere with the wrapper that I'm missing?
=============================
#!/opt/teamsite/iw-home/iw-perl/bin/iwperl
# Flush the output buffer right away.
$| = 1;
use TeamSite::CGI_lite;
use TeamSite::Config;
use TeamSite::WFtask;
use TeamSite::WFworkflow;
use FedEx::Usertask;
my($cgi) = TeamSite::CGI_lite->new();
$cgi->parse_data();
my($wfid, $taskid, $area) = (
@ARGV[2..4]);
my($task) = new TeamSite::WFtask($taskid);
my($job) = new TeamSite::WFworkflow($wfid);
#my($taskid) = $cgi->{'form'}{'iw_taskid'} || $cgi->{'form'}{'task_id'};
my($task) = TeamSite::WFtask->new($taskid);
my($nexttask) = $taskid + 1;
$area = $task->GetArea() if (!$area);
my($new_owner) = $cgi->{'form'}{'developer'};
my($workflow_roles) = "/opt/teamsite/iw-home/local/config/wft/fedex/roles";
my($role_list)="$workflow_roles/role.uid";
my($branch_path)="/default/main/us/about";
my
@developers = FedEx::Usertask::xml_get_dev_users($role_list,$branch_path);
if ($new_owner eq ""){
print<<EOD;
Content-type:text/html
<html>
<head>
<title>Assign developer for Task</title>
</head>
<body>
<h1>Assign developer for task</h1>
<p>Pick a developer:<br/>
<form name="form" action="setdeveloper.cgi" method="post">
<select name="developer">
<option value="">================</option>
EOD
foreach $developer(
@developers){ chomp($developer);
print "<option value='$developer'>$developer</option>\n";
}
print<<EOD;
</select>
<br/>
Comments:<textarea cols="50" rows="3" name="comments"></textarea>
<input type="submit" name="submit"/>
</form>
</p>
</body>
</html>
EOD
}
else{
print<<EOD;
Content-type:text/html
<html>
<head>
<title>Assign developer for Task</title>
</head>
<body>
Assigned
</body>
</html>
EOD
$retcode = `/opt/teamsite/iw-home/bin/iwsettaskownerandarea $nexttask $new_owner $area`;
$task->CallBack($retcode, "Set developer to $new_owner");
}
exit(0);
===========================
Thanks,
Mark