Hello,Yes the file is is IWHOME/httpd/iw-bin. I forgot put in the IWHOME part.Thanks
Okay I've been working with Teamsite for a bit and have managed to do quite well on my own and by browsing these forums. There is one issue I hit that is getting to me a bit.Here are my specifics:Teamsite 6.5 - SP2Windows 2000 Server - SP4In my DCT, I have a function that is executed on "onSaveDone" and it's calling a Perl file to do some stuff in the background. To start off and make sure I had things right, I created a simple perl program that creates a file (the file is stored in /httpd/iw-bin. It's called "createFile.ipl"Here is the perl code within the file:-----------------------#!E:\iw-home/iw-perl/bin/iwperlopen SAVELOG, ">>e:\onSave.log";print SAVELOG "WORKED\n";close (SAVELOG); -----------------------I ran it from the command line using the IWperl (it's in my path) and it works fine (file is created).Now in my function within my DCT, I make perform a callServer and everything appears to run fine - I get no error coming back but the file that is supposed to be created in the perl script does not get created. I put in an alert after the "callServer" and it doesn't get executed so things seem to be hanging at that line. the DCR is created by the the DCT screen does not get refreshed (so the file name does not appear even though the file has been created). Function code:var server = window.location.hostname;var params = new Object();callServer("http://"+server+"/iw-bin/iw_cgi_wrapper.cgi/createFile.ipl", params, true);Am I suffering from a case of the Friday stupids or am I way off base here?Suggestions? cheers!
function runFileName(file,name,path1,path2){var server = window.location.hostname;var params = new Object();params.fileName = file;params.fileObjectName = name;params.path1 = path1;params.path2 = path2;IWDatacapture.displayMessage("Getting file data ...");top.hiddenFrameRunning = true;IWDatacapture.callServer("http://"+server+"/iw-bin/custom/production/formapi/shared/filedata.ipl", params);}
#!e:\iw-home/iw-perl/bin/iwperl.exe -w#This returns the file size, type, and download time for attachmentsuse CGI;use Teamsite::Config;#Turn buffering off.$| = 1;my${cgi} = new CGI();my $file = ${cgi}->param('fileName');my $fileObjectName = ${cgi}->param('fileObjectName');my $path1 = ${cgi}->param('path1');my $path2 = ${cgi}->param('path2');print "Content-type: text/html\n\n";my $path = "y:\\\\default\\\\main\\\\".$path1."\\\\WORKAREA\\\\".$path2;my $fullfile = $path.$file; $fullfile =~ s|/|\\\\|g; #$fullfile =~ s|\\app16||g; my $extension = substr($fullfile,-3,3); my $size = -s $fullfile; my $bytes = $size; my $finsize = ""; my $fex = ""; my $isSpaces = "false"; if($size < 1024) {$fex = "Bytes"} else { if($fileObjectName eq '/fileNameFr') { $fex = "Ko"; } else { $fex = "Kb"; } $size = int($size / 1024) } if($size > 1000) {$fex = "Mb"; $size = $size / 1000; $size = sprintf("%.1f",abs($size))} $finsize = ($size . " " . $fex);print <<script language="javascript"> var finSize ='$finsize'; var fileObjectName ='$fileObjectName'; var fileType = '$extension'; var bytes = '$bytes'; // Set up the options object for a locations. $location</script>EOTexit;
To Taalgaard and others.. THANK YOU for all your help - most appreciated! The solution to this little mindbender was twofold.1) I got rid of the cgi-wrapper and called the perl file directrly with my callServer methodvar server = window.location.hostname;IWDatacapture.callServer("http://"+server+"/iw-bin/createAltLanguage.ipl"); 2) My perl code was missing a "\" on the open SAVELOG line (after the "e:\")The correct code is then-----------------------#!E:\iw-home/iw-perl/bin/iwperlopen SAVELOG, ">>e:\\onSave.log";print SAVELOG "WORKED\n";close (SAVELOG); -----------------------Thanks again to those who chimed in to help and for those who shared your code insights!FF
Thanks Ghoti - good point. Btw - are you at GearUp? if so, how was Cirque du Soleil? l8r