For those interested, here is a message from Jim Mauney explaining how he dealt with file uploading on Win NT4 (perhaps this is relevant to fixing file uploading in MacPerl): Jim Mauney wrote: > > Hello, > > Encountered a problem with the CGI TempFile on a Win NT4 platform. > The install set the temporary directory to D:\Temp because Perl/CGI.pm > was stored on the D: drive. Changed the CGI.pm code to point to > C:\Temp solved my problem. Found this in CGI.pm documentation under > "Using CGI.pm on non-Unix Platforms". > > Don't know if that is your problem because you are getting a different > error messages. It may have to do with permissions to write to your > TempFile directory. > > Luck, > Jim > > On Wed, 11 Feb 1998 19:18:20 +0200, in comp.lang.perl.modules you > wrote: > > >Has anybody else ever encountered problems while using CGI.pm's filefield > >(uploading) function? The following bit of code lets you upload a file to a > >server. However, when you press the submit button called "Envoyer", you get > >the following error message: > > > >"Diagnostic Output > > > ># CGI open of .:CGItemp10001: Invalid argument" > > > >Is this due to a bug in CGI.pm or something else? > > > >Anyone's help would be greatly appreciated. > > > >Philippe de Rochambeau > > > >==================== Code begins here ============================ > > > >#!perl > ># Nom : testUpload.pl > ># Date : 11/2/98 > ># But : Tester les possibilits du file upload > > > >my ($query, $p, $br); > > > >$p = "<P>"; > >$br = "<BR>"; > > > >use CGI; > > > >$query = new CGI; > > > >print $query->header; > >print $query->start_html(-title=>'Chargement de fichier'); > >print $query->start_multipart_form(-action=>'testFileRecup.acgi'); > > > >print $p . "Sujet : "; > >print $query->textfield(-name=>'sujet', > > -default=>'Sujet', > > -size=>40, > > -maxlength=>40); > > > >print $p . "Catégorie : "; > >print $query->popup_menu(-name=>'categorie', > > -values=>['cat1','cat2','cat3','cat4','autre'], > > -default=>'cat1'); > > > >print $p . "Remarques : "; > >print $query->textarea(-name=>'remarques', > > -default=>'Remarques', > > -rows=>10, > > -columns=>50); > > > >print $p. "Pièces jointes : "; > >print $query->filefield(-name=>'fichiercharge'); > > > >print $p; > > > >print $query->submit(-name=>'Envoyer'); > >print $query->endform; > > > >if ($query->param()) { > > > >print "<P>Parametres:\n"; > >print $br; > > > >print $p . $query->param('sujet'); > >print $p . $query->param('categorie'); > >print $p . $query->param('remarques'); > >print $p . $query->param('fichiercharge'); > >} > > > >print $query->end_html; Received: from ns2.netmcr.com (root@ns2.netmcr.com [208.150.0.2]) by mail.club-internet.fr (8.8.8/MGC-970630-No_Relay) with ESMTP id WAA25971 for <pr1@club-internet.fr>; Thu, 12 Feb 1998 22:46:41 +0100 (MET) Received: from gb-3-132.netmcr.com (joshua.tree@gb-3-132.netmcr.com [208.150.15.132]) by ns2.netmcr.com (8.8.5/8.7.3) with SMTP id RAA13304 for <pr1@club-internet.fr>; Thu, 12 Feb 1998 17:05:52 -0500 (EST) From: jmauney@geocities.com (Jim Mauney) To: pr1@club-internet.fr Subject: Re: Problem with CGI.pm's filefield (uploading) function Date: Thu, 12 Feb 1998 22:44:23 GMT Message-ID: <34e37920.2237186@smtpmail.netmcr.com> References: <34E1DD5B.4EB1D87D@club-internet.fr> In-Reply-To: <34E1DD5B.4EB1D87D@club-internet.fr> X-Mailer: Forte Free Agent 1.11/32.235 MIME-Version: 1.0 X-MIME-Autoconverted: from 8bit to quoted-printable by err.ethz.ch id JAB13699 Hello, Encountered a problem with the CGI TempFile on a Win NT4 platform. The install set the temporary directory to D:\Temp because Perl/CGI.pm was stored on the D: drive. Changed the CGI.pm code to point to C:\Temp solved my problem. Found this in CGI.pm documentation under "Using CGI.pm on non-Unix Platforms". Don't know if that is your problem because you are getting a different error messages. It may have to do with permissions to write to your TempFile directory. Luck, Jim On Wed, 11 Feb 1998 19:18:20 +0200, in comp.lang.perl.modules you wrote: >Has anybody else ever encountered problems while using CGI.pm's filefield >(uploading) function? The following bit of code lets you upload a file to a >server. However, when you press the submit button called "Envoyer", you get >the following error message: > >"Diagnostic Output > ># CGI open of .:CGItemp10001: Invalid argument" > >Is this due to a bug in CGI.pm or something else? > >Anyone's help would be greatly appreciated. > >Philippe de Rochambeau > >==================== Code begins here ============================ > >#!perl ># Nom : testUpload.pl ># Date : 11/2/98 ># But : Tester les possibilités du file upload > >my ($query, $p, $br); > >$p = "<P>"; >$br = "<BR>"; > >use CGI; > >$query = new CGI; > >print $query->header; >print $query->start_html(-title=>'Chargement de fichier'); >print $query->start_multipart_form(-action=>'testFileRecup.acgi'); > >print $p . "Sujet : "; >print $query->textfield(-name=>'sujet', > -default=>'Sujet', > -size=>40, > -maxlength=>40); > >print $p . "Catégorie : "; >print $query->popup_menu(-name=>'categorie', > -values=>['cat1','cat2','cat3','cat4','autre'], > -default=>'cat1'); > >print $p . "Remarques : "; >print $query->textarea(-name=>'remarques', > -default=>'Remarques', > -rows=>10, > -columns=>50); > >print $p. "Pièces jointes : "; >print $query->filefield(-name=>'fichiercharge'); > >print $p; > >print $query->submit(-name=>'Envoyer'); >print $query->endform; > >if ($query->param()) { > >print "<P>Parametres:\n"; >print $br; > >print $p . $query->param('sujet'); >print $p . $query->param('categorie'); >print $p . $query->param('remarques'); >print $p . $query->param('fichiercharge'); >} > >print $query->end_html;