I use Perl to write a short program for optimize Netscape iPlanet Server that compiles an application in JavaScript Server side by jasc command. My simple source code as:
#############################################################
#!/usr/bin/perl
print "Content-type:text/html\n\n";
$main_dir = "document-root/my_directory";
$web_file = "my_web.web";
$ENV{'PATH'} = '/opt/netscape/suitespot/bin/https/bin';
$ENV{'LD_LIBRARY_PATH'} = '/opt/netscape/suitespot/bin/https/lib';
$st = "jsac -p \"$main_dir\" -f list.txt -o $web_file -r error.txt" ;
print "<HTML><BODY>";
system($st);
print "Generating success!"
;
print "</BODY></HTML>";
exit;
#############################################################
<i>I saved this file as run.cgi</i>
The jasc running well but allways display these line:
"JavaScript Application Compiler Version 24.13
Copyright (C) Netscape Communications Corporation 1996 1997
All rights reserved."
When I sumbit my HTML form with action is run.cgi and method POST server always return an error message like "The page can not display...". Then I view my web server error file and get this line:
[11/Jul/2001:20:06:21] failure ( 2034): for host 203.162.49.43 trying to POST /cgi-bin/admin/run.cgi, cgieng_scan_headers reports: the CGI program /opt/netscape/suitespot/docs/cgi-bin/admin/run.cgi did not produce a valid header (name without value: got line "javascript application compiler version 24.13"
Please help me for ignoring any return message from SYSTEM command with Perl.
Thanks
Nguyen Truong
#############################################################
#!/usr/bin/perl
print "Content-type:text/html\n\n";
$main_dir = "document-root/my_directory";
$web_file = "my_web.web";
$ENV{'PATH'} = '/opt/netscape/suitespot/bin/https/bin';
$ENV{'LD_LIBRARY_PATH'} = '/opt/netscape/suitespot/bin/https/lib';
$st = "jsac -p \"$main_dir\" -f list.txt -o $web_file -r error.txt" ;
print "<HTML><BODY>";
system($st);
print "Generating success!"

print "</BODY></HTML>";
exit;
#############################################################
<i>I saved this file as run.cgi</i>
The jasc running well but allways display these line:
"JavaScript Application Compiler Version 24.13
Copyright (C) Netscape Communications Corporation 1996 1997
All rights reserved."
When I sumbit my HTML form with action is run.cgi and method POST server always return an error message like "The page can not display...". Then I view my web server error file and get this line:
[11/Jul/2001:20:06:21] failure ( 2034): for host 203.162.49.43 trying to POST /cgi-bin/admin/run.cgi, cgieng_scan_headers reports: the CGI program /opt/netscape/suitespot/docs/cgi-bin/admin/run.cgi did not produce a valid header (name without value: got line "javascript application compiler version 24.13"

Please help me for ignoring any return message from SYSTEM command with Perl.
Thanks
Nguyen Truong