[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] PCGI trouble



>>I've been trying to use a Perl5 script to process form input.  The script
>>uses the CGI and SMTP modules.  The script works fine in offline mode and
>>I've gotten
>>it to work on some servers.  When the script fails, the PCGI app cannot be
>>quit with the 'quit now' button, nor can it forced quit without seriously
>>upsetting other applications, nor does it quit on it's own.
>>
>>The WWW server error says 'Error -1701 Getting CGIreply string (Requested
>>descriptor was not found (reply))'.   I'm using Mac_Perl_510b2r2 and
>>wondering
>>if anyone else has seen this kind of behavior??
>>
>>------------------------------------------------
>>John Whelan                 ImageLinc Commercial
>>em: johnw@imagelinc.com     Internet Services
>>fax: 206.812.1033           ph: 206.812.2662
>
>Could you post the script (or send it email) for everyone to see? Also,
>include what servers the script works on and where it doesn't. If it
>consistantly works on one server rather that another (or one platform
>rather than another) you could be running into the same problem I did when
>porting mac script up to unix.
>
>cheers
>
>Tim Broderick
>tjbroder@tezcat.com

Most of my problems seem to involve 'SMTP.pm', which I
got from the schinder dir on ftp.switch.ch.  The CGI.pm
calls all seem to work fine.

I have only tried this on MacPPC/SSv.7.5.3 servers.
copied script from workstation to server -> failed
opened script from server and resaved as CGI
  -> succeeded, but 2nd time failed then sys err

Most of the time giving server err:
Error -1712: Sending CGI sdoc Event (AppleEvent timed out)
Error executing CGI application.
Error -1700: GetAttrPtr retID (Reply Data could not be coerced to requested
type (char))
Error handling HighLevelEvent -1700

which is a different error than before, go figure.

The following test script produced the kind of problems
I mentionned previously:

#! ./perl -Tw
use strict;

use Net::SMTP;

my $N = "\015\012";

my $to = 'johnw@imagelinc.com'; # please change, I get enough mail
my ($to, $that_host) = split(/@/, $to, 2);

my $smtp = Net::SMTP->new($that_host);

$smtp->mail('this_CGI');
$smtp->to($to);
$smtp->data();
$smtp->datasend("To: $to$N");
$smtp->datasend($N);
$smtp->datasend("BlahBlahBlahBlahBlahBlah");
$smtp->dataend();
$smtp->quit;
print "Mail sent$N";

------------------------------------------------
John Whelan                 ImageLinc Commercial
em: johnw@imagelinc.com     Internet Services
fax: 206.812.1033           ph: 206.812.2662