I am trying to call below given test.cgi file using IWDatacapture.callServer command as below.IWDatacapture.callServer("http://"+server+"/iw-bin/test.cgi");test.cgi -----#!/iw-home/iw-perl/bin/iwperluse CGI qw(:standard);my $debugFile = "/tmp/test.log";open (DEBUG,">$debugFile");print DEBUG "****** Start Debugging *******";close(DEBUG);----------But this test.log file is not creating in side the tmp folder.I am calling this call server function in side java script file and I guess this is executing using iw-ui user,Please help me to resolve this issue.
I am trying to call below given test.cgi file using IWDatacapture.callServer command as below.IWDatacapture.callServer("http://"+server+"/iw-bin/test.cgi");test.cgi -----#!/iw-home/iw-perl/bin/iwperluse CGI qw(:standard);my $debugFile = "/tmp/test.log";open (DEBUG,">$debugFile");print DEBUG "****** Start Debugging *******";close(DEBUG);----------But this test.log file is not creating in side the tmp folder.
[...]test.cgi -----#!/iw-home/iw-perl/bin/iwperluse CGI qw(:standard);my $debugFile = "/tmp/test.log";open (DEBUG,">$debugFile");print DEBUG "****** Start Debugging *******";close(DEBUG);
#!/iw-home/iwperl/bin/iwperluse strict;use warnings; [color=red]# This assumes TS6.x with Perl 5.8.2 (or higher)# use File::Temp qw(tempfile); # optional[/color]use CGI qw(:standard);use CGI::Carp qw(fatalsToBrowser);my $debugFile = "/tmp/test.log"; # or: my($fh, $fname) = tempfile(); # - if you use tempfile, you don't need the open() call, it's done for youopen(DEBUG, '>', $debugFile) || die " '$debugFile' ($!)";print DEBUG "****** Start Debugging *******";close(DEBUG);