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

Re: [MacPerl] PCGI trouble



johnw@imagelinc.com (John Whelan) writes:
} >>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??

Since you're using 5.10b2r2, you can safely use the latest version of
Net::SMTP if you want (I doubt it will help, but you can try).  You can
find it inside

<ftp://mors.gsfc.nasa.gov/pub/MacPerl/Scripts/Beta/libwww-perl-5.01.sit.hqx>

Extract the Net folder from the archive; it's all you should need. I've
never tested this version on the Mac, but neither Net::SMTP or Net::Cmd
now need any changes to work on a Mac, and I've used Net::FTP on my Mac
(which, like Net::SMTP, also uses Net::Cmd as the engine.)

} >>
} >>------------------------------------------------
} >>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

Reading this (and checking the error codes in the Applescript Language
Guide) , I'd guess the following: for some reason, the SMTP connection
was taking too long (or maybe failing), and so the server gave up on
the CGI. Since nothing came back, it couldn't "coerce to requested
type".  A timeout would explain the erratic "sometimes works, sometimes
doesn't" behavior.  Is there a way of setting the server's CGI timeout
to something longer (or maybe setting the timeout in Net::SMTP to
something shorter), and/or connecting to a faster/more reliable SMTP
server?

[snip]
} 
} ------------------------------------------------
} John Whelan                 ImageLinc Commercial
} em: johnw@imagelinc.com     Internet Services
} fax: 206.812.1033           ph: 206.812.2662
} 
} 
} 
---
--------
Paul J. Schinder
NASA Goddard Space Flight Center,
Code 693, Greenbelt, MD 20771 USA
schinder@pjstoaster.pg.md.us