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

Re: [MacPerl-WebCGI] File Upload cgi - Yet again...



At 5:34 PM -0500 4/2/00, Jon Streeter wrote:

[several snips]

>In a message on Tue, 28 Sep 1999 23:32:29 -0700, Bruce Van Allen
><bva@cruzio.com> wrote regarding a post by Adam jenkins:

>>>  had
>>>wished to use cgi.pm, but was told (in the cgi.pm information) that file
>>>upload does not tend to work very well with Macs, if at all.>

>>Hmmm. What version? Mine work fine with current CGI.pm installations.

>Perhaps bruce could enlighten us with some working code...

Glad to see people are searching the archives, but... I was afraid 
someone would come across this old posting of mine, blurted out in a 
moment of cross-platform bliss.

I use MacPerl for lots of purposes, but for CGI I only develop on Mac 
for ultimate deployment on Unix/Linux or NT. This is mostly a matter 
of where my clients host their sites, but see below.

I _do_ use local web hosting for testing CGI scripts, but since I 
don't expect my CGI stuff to live on Mac, if something doesn't work 
for a Mac-specific reason, I don't waste time figuring out why (this 
is rare, anyway). I just eval around it, which usually just adds a 
layer of error checking that doesn't hurt to have when the script 
reaches its final destination.

With this approach, my working experience with CGI is that every line 
I code is for cross-platform Perl, and I give daily thanks to those 
who've made it possible for me to do this on Mac. But I also forget 
where I am sometimes when someone posts a question. The MacPerl 
scribes know this, 'cause I offered an article on map, grep, & sort 
when they were requesting ideas for MacPerl scripting...

I find local web hosting very handy as a quick 'n' easy user 
interface for non-CGI tasks, for which I write lots of MacPerl.

For either use of the CGI transaction, I use CGI.pm extensively. Used 
to roll my own, prodded by some awful early books on CGI programming; 
then I used Steve Brenner's cgi-lib.pl for a couple years. Now that 
CGI.pm is part of the standard Perl distribution, why not use it?

But back to the original question...

Not being concerned with production use of a Mac web server, I've 
never pursued the question of file upload to Mac. Hang on while I try 
a few things...

OK, I'm back. The sad answer is that I checked a few of my scripts 
that employ file upload, currently working reliably on *nix/NT, and 
none works with local web sharing on Mac. One obvious issue is the 
directory for the temp files created upon upload, but recent versions 
of CGI.pm provide the Right Thing if the OS is Macintosh. So I don't 
have an obvious path to suggest for those who want this to work.

I was going to let this whole thread go to others until Jon Streeter 
used my name. Let me pose a question back to those who're asking 
about file uploads: are you really trying to do this with MacPerl, 
for HTML/CGI file uploads to a Mac web server? If not, CGI.pm does a 
great job at this on other platforms, so stick with it, and post 
questions that can be answered.  :-)

Otherwise, pace discussion on this list, I don't currently recommend 
MacPerl for CGI on a Mac web server. Watch for David Steffen's 
article in PerlMonth's Script Different column for a great discussion 
of this among other MacPerl/CGI techniques & issues. In the 
short-to-medium term, we can look forward to developments in MacPerl 
and in the Mac OS that might improve the viability of [Mac]Perl as a 
CGI language. Until that happens, though, I question the value of 
seeking a solution to file upload problems.

1;

-- 

- Bruce

__Bruce_Van_Allen___bva@cruzio.com__Santa_Cruz_CA__

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org