I tried the code. Still nothing. I did turn On PerlWarn in httpd.conf. Upon restart I saw the following:
<errorlog> [Wed Mar 20 07:55:19 2002] [info] master_main: Restart event signaled. Doing a graceful restart. defined(@array) is deprecated at C:/Perl/site/lib/Apache/DBI.pm line 135. (Maybe you should just omit the defined()?) [Wed Mar 20 07:55:21 2002] [info] Parent: Created child process 2936 [Wed Mar 20 07:55:21 2002] [info] Parent: Duplicating socket 244 and sending it to child process 2936 [Wed Mar 20 07:55:22 2002] [info] BytesRead = 372 WSAProtocolInfo = 2006620 [Wed Mar 20 07:55:26 2002] nul: Use of uninitialized value in subroutine entry at C:/Perl/site/lib/Apache.pm line 61. </errorlog> I am not sure where the Apache::DBI error crept in, but I believe it is unrelated. As for line 61 of Apache, I do not know if this is a warning I can ignore or not. Also, as for not using parse() -- it was my understanding it was not necessary to call explicitly, however you could use the status to provide some error catching. . . Is there a bare-bones httpd.conf file I can use to run mod_perl? I am presuming it is my configuration of Apache that might be causing problems. I have the latest mod_perl, apache modules, and apache that I am aware of. completely befuddled now. :| Thanks, Ward : -----Original Message----- : From: Randy Kobes [mailto:[EMAIL PROTECTED]] : Sent: Tuesday, March 19, 2002 9:24 PM : To: Vuillemot, Ward W : Cc: 'Issac Goldstand'; [EMAIL PROTECTED] : Subject: Re: mod_perl does not see multipart POSTs : : : : ----- Original Message ----- : From: "Vuillemot, Ward W" <[EMAIL PROTECTED]> : To: "'Issac Goldstand'" <[EMAIL PROTECTED]>; : <[EMAIL PROTECTED]> : Sent: Tuesday, March 19, 2002 2:30 PM : Subject: RE: mod_perl does not see multipart POSTs : : : > I simplified everything to the bare bones. Nothing is : getting passed. I : am : > at a complete loss. If anyone has a few minutes, just : try running this. : > You should be able to point it toward a text/plain file : and have it : > displayed below the file upload form. : : I'm not quite sure what the full requirements are, but : the following : works for me in displaying the contents of the uploaded : file - this : is on Win32 with the latest mod_perl/libapreq packages. : : In httpd.conf: : ****************************************************** : PerlModule Apache::testUpload : <Location /testUpload> : SetHandler perl-script : PerlHandler Apache::testUpload : PerlSendHeader Off : </Location> : ****************************************************** : and Apache/testUpload.pm is : **************************************************** : package Apache::testUpload; : use strict; : ############################## : ### START LOADING MODULES ### : ############################## : use Apache::Request (); : use CGI; : use Apache::Constants qw(:common); : ############################## : ### HANDLER ### : ############################## : sub handler{ : my $q = Apache::Request->new(shift, DISABLE_UPLOADS => 0, : POST_MAX => 20480000); : return main($q); : } : : ############################## : ### START OF MAIN LOGIC ### : ############################## : sub main{ : my $q = shift; : my $status = $q->parse(); : return $status unless $status == OK; : my %results = (); : my $cgi = CGI->new(); : ######################### : ## START FORM ## : ######################### : $results{content} .= $cgi->start_multipart_form; : $results{content} .= $cgi->filefield(-name=>'uploaded_file', : -default=>'starting value', : -size=>50, : -maxlength=>80); : $results{content} .= $cgi->submit(); : $results{content} .= $cgi->endform; : ######################### : ## START UPLOAD FILE ## : ######################### : my $upload = $q->upload || undef; : if ($upload) { : my $fh = $upload->fh; : my $filename = $upload->filename; : my $size = $upload->size; : $results{content} .= "Upload File<br />"; : $results{content} .= "Filename: $filename<br />"; : $results{content} .= "Size: $size<br />"; : $results{content} .= "$_<br />" while <$fh>; : } : ######################### : ## START OUTPUT ## : ######################### : # send results to browser : $q->send_http_header('text/html'); : print $cgi->start_html('File Upload Test'); : print $cgi->h1('Content') . $results{content}; : print $cgi->end_html(); : return OK; : } : 1; : ****************************************************** : : Apart from abbreviating the output, one difference between the : above and your original is the $q->parse() call within main(). : : best regards, : randy kobes : :