E
E Arredondo
Here's my cgi script :
---------------------------------------
#!/usr/bin/perl -w
use CGI;
$upload_dir = "/upload";
$query = new CGI;
$filename = $query->param("photo");
$claim = $query->param("claim");
$filename =~ s/.*[\/\\](.*)/$1/;
$upload_filehandle = $query->upload("photo");
open UPLOADFILE, ">$upload_dir/$filename";
binmode UPLOADFILE;
while ( <$upload_filehandle> )
{
print UPLOADFILE;
}
close UPLOADFILE;
print $query->header ( );
print <<END_HTML;
<HTML>
<HEAD>
<TITLE>Thanks!</TITLE>
<HEAD>
<TITLE>Thanks!</TITLE>
</HEAD>
<BODY>
<P>Thanks for uploading your photo!</P>
<P>Your Claim: $claim</P>
</BODY>
</HTML>
END_HTML
--------- cut here --------------------------------
And here's the log file :
binmode() on closed filehandle UPLOADFILE at
/usr/lib/apache/cgi-bin/upload.cgi
line 13.
print() on closed filehandle UPLOADFILE at
/usr/lib/apache/cgi-bin/upload.cgi li
ne 16, <fh00001C%3A\Graphics\crank.JPG> line 1.
print() on closed filehandle UPLOADFILE at
/usr/lib/apache/cgi-bin/upload.cgi li
ne 16, <fh00001C%3A\Graphics\crank.JPG> line 2
keeps going........all the way until
print() on closed filehandle UPLOADFILE at
/usr/lib/apache/cgi-bin/upload.cgi li
ne 16, <fh00001C%3A\Graphics\crank.JPG> line 433.
print() on closed filehandle UPLOADFILE at
/usr/lib/apache/cgi-bin/upload.cgi li
ne 16, <fh00001C%3A\Graphics\crank.JPG> line 434.
print() on closed filehandle UPLOADFILE at
/usr/lib/apache/cgi-bin/upload.cgi li
ne 16, <fh00001C%3A\Graphics\crank.JPG> line 435.
UX:lp: ERROR: No default destination.
TO FIX: You must identify which printer should
handle your request by naming it or a
class of printers (-d name) or by naming
a type of printer (-T type).
----------------------- cut here ------------------------------------
I can't find the file, so I'm assuming that it tried it to print , Am I
right ?
I'm running SCO OSR 507 (please don't flame me), and perl version 5.8.6EB
Thanks
---------------------------------------
#!/usr/bin/perl -w
use CGI;
$upload_dir = "/upload";
$query = new CGI;
$filename = $query->param("photo");
$claim = $query->param("claim");
$filename =~ s/.*[\/\\](.*)/$1/;
$upload_filehandle = $query->upload("photo");
open UPLOADFILE, ">$upload_dir/$filename";
binmode UPLOADFILE;
while ( <$upload_filehandle> )
{
print UPLOADFILE;
}
close UPLOADFILE;
print $query->header ( );
print <<END_HTML;
<HTML>
<HEAD>
<TITLE>Thanks!</TITLE>
<HEAD>
<TITLE>Thanks!</TITLE>
</HEAD>
<BODY>
<P>Thanks for uploading your photo!</P>
<P>Your Claim: $claim</P>
</BODY>
</HTML>
END_HTML
--------- cut here --------------------------------
And here's the log file :
binmode() on closed filehandle UPLOADFILE at
/usr/lib/apache/cgi-bin/upload.cgi
line 13.
print() on closed filehandle UPLOADFILE at
/usr/lib/apache/cgi-bin/upload.cgi li
ne 16, <fh00001C%3A\Graphics\crank.JPG> line 1.
print() on closed filehandle UPLOADFILE at
/usr/lib/apache/cgi-bin/upload.cgi li
ne 16, <fh00001C%3A\Graphics\crank.JPG> line 2
keeps going........all the way until
print() on closed filehandle UPLOADFILE at
/usr/lib/apache/cgi-bin/upload.cgi li
ne 16, <fh00001C%3A\Graphics\crank.JPG> line 433.
print() on closed filehandle UPLOADFILE at
/usr/lib/apache/cgi-bin/upload.cgi li
ne 16, <fh00001C%3A\Graphics\crank.JPG> line 434.
print() on closed filehandle UPLOADFILE at
/usr/lib/apache/cgi-bin/upload.cgi li
ne 16, <fh00001C%3A\Graphics\crank.JPG> line 435.
UX:lp: ERROR: No default destination.
TO FIX: You must identify which printer should
handle your request by naming it or a
class of printers (-d name) or by naming
a type of printer (-T type).
----------------------- cut here ------------------------------------
I can't find the file, so I'm assuming that it tried it to print , Am I
right ?
I'm running SCO OSR 507 (please don't flame me), and perl version 5.8.6EB
Thanks