Well...I'm not by any means a perl guru, but here ya go with an attempt at
help
 
I would try commenting out the  unlink @unlinkfiles; lines at the bottom,
then look at the files that you would have normally deleted, and see if they
are also 0 length files, this will tell you if the problem is with the
generation of the files or if it's the attachment into Remedy that's causing
issues.
 
http://search.cpan.org/src/JMURPHY/ARSperl-1.91/html/manual/ds_attach_hash.h
tml
 
that site gives the hash returned when you are getting an entry with an
attachment, but doesn't do much to tell you how to add the attachment into
Remedy, in this case the documents are a bit sparse...

  _____  

From: Steve McDonald [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 24, 2008 4:12 PM
To: ARSperl User Discussion
Subject: [Arsperl-users] Problem with attachments via web


Hello All,
 
I have a web page where I accept attachments for submission into Remedy.  As
of right now the ticket gets submitted and the attachment filename comes
through but I'm getting zero length attachments.  Here's the code, anyone
got a thought or suggestion?
 
if(($name && $email && $phone && $code && $reqcat && $reqtyp && $desc) ||
$reqid) {
 $ctrl = ars_Login("suncoast", "xxxxxx", "xxxxxx");
 if(!$ctrl) { $err="Cannot login to remedy server - $ars_errstr"; }
 else {
  %fldtab = ars_GetFieldTable($ctrl, $schema);
  if(!%fldtab) { $err="Cannot get field table from remedy - $ars_errstr"; }
 }
}
 
if(!$err && $name && $email && $phone && $code && $reqcat && $reqtyp &&
$desc) {
 my @fields = ();
 push(@fields, 7, 0);
 push(@fields, 8, 'Submitted via web, please supply a proper description');
 push(@fields, 536870931, $code);
 push(@fields, 536871062, $name);
 push(@fields, 536871065, $phone);
 push(@fields, 536871067, $email);
 push(@fields, 536871089, $desc);
 push(@fields, 100000014, $reqcat);
 push(@fields, 100000039, $reqtyp);
 my @fieldids = (950000008,950000009,950000010,950001021);
 
 my $k; my $line;
 my @unlinkfiles = ();
  for $k($cgi->param) {
  if(length($k)>0) {
   if(substr($k,0,6) eq 'attach') {
    my $n=$k;
    my $v=$cgi->param($n);
    if (-f $v) {
     my @s=stat($v);
     $v=~m/^.*( <file://\\|\/)(.*)/> \\|\/)(.*)/; # strip the remote path
and keep the filename
     my $filename = $2;
     $out = $out . "Thanks for $filename ($s[7] bytes). ";
     my $tempfile = tmpnam();
     push(@unlinkfiles,$tempfile);
     open(OUTP,">$tempfile"); open(INP,$v); while($line = <INP>) { print
OUTP $line; } close(INP); close(OUTP);
     my %f=(file => $tempfile, name => $filename, size => $s[7]);
     push(@fields, shift(@fieldids), \%f);
    }
   }
  }
 }
 $submittedreqid = ars_CreateEntry($ctrl, $schema, @fields);
 if(!$submittedreqid) { $err="Cannot create remedy ticket - $ars_errstr"; }
 unlink @unlinkfiles;
}

Thanks for the eyes!
 
 

  _____  

From: Jonathan Livingston [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2008 1:17 PM
To: ARSperl User Discussion
Subject: Re: [Arsperl-users] ARSPerl on Windows 2003 server


I'm trying to use the ppd to do the install, but it's reporting "ppm install
failed: The PPD does not provide code to install for this platform". I am on
Windows 2003 Enterprise 32-bit and using Perl 5.1. 




On Tue, Sep 23, 2008 at 3:49 PM, LJ Longwing <[EMAIL PROTECTED]> wrote:


I always use the ppd file...the latest version I have found with a ppd
published is 1.90.  just do a google for arsperl ppd 1.90 and you should
find the same ppd I found last week.  Then you can extract that zip file
(including the sub folders)...and then you can use PPM to install.

  _____  

From: Jonathan Livingston [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2008 8:15 AM
To: arsperl-users@arsperl.org
Subject: [Arsperl-users] ARSPerl on Windows 2003 server


Hello all,

I've been trying to get ARSperl working on a Windows 2003 server. Initially,
I was trying to load and compile on the server. When I figured out that I
needed a C compiler, I had to stop there. The server doesn't have a C
compilter and I can't load one on a production server. Next, I tried trying
to use the zip file with the precompiled option and using 'ppm install' to
install it. However, ppm reported that it doesn't provide code for this
platform. So, I took the tar file and extracted the files to their proper
places. Now when I try to run arsperl, I get an unhandled exception within
the ARS.dll. Does anyone have this working on a Windows 2003 server?

Thanks in advance for any help.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100
<http://moblin-contest.org/redirect.php?banner_id=100&url=/> &url=/


--
Arsperl-users mailing list
Arsperl-users@arsperl.org
https://lists.sourceforge.net/lists/listinfo/arsperl-users




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

--
Arsperl-users mailing list
Arsperl-users@arsperl.org
https://lists.sourceforge.net/lists/listinfo/arsperl-users

Reply via email to