in reply to Re^2: Upoading file using perl
in thread Upoading file using perl

740794 might help.. also, can you tail the erorr log on apache?

Replies are listed 'Best First'.
Re^4: Upoading file using perl
by rustybar (Novice) on Feb 09, 2009 at 15:15 UTC

    I'm using monkey web server instead of apache. The error log in monkey web server is also the same.

    I had seen the thread, I'm not really sure how to verify my CGI though. It comes with perl isn't it? Mine is the latest version.

    I also use IE browser to try and it ends up saying he connection is disconnected

    What could be the problem?

      If you post your cgi code (i think you did) and your form code. I'll try it out on another server under apache.

        Hi, my web page for the user to upload the code is as below:

        #!/usr/bin/perl -w use CGI qw/:standard/; use CGI::Carp qw/fatalsToBrowser warningsToBrowser/; use CGI::Session ( '-ip_match' ); my $session = CGI::Session->load(); #my $sid = $cgi->cookie("CGISESSID") || undef; #my $session = new CGI::Session(undef, $sid, {Directory=>'/tmp'}); if($session->is_empty){ print redirect('index.cgi'); } elsif($session->is_expired){ print redirect('index.cgi?status=expired'); } else{ print "Content-type: text/html\n\n"; print <<EOD; <html> <head> <title>NTU Earth Observatory Station</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1 +"> <link rel="stylesheet" href="/css/styles.css" type="text/css"> </head> <body bgcolor="#999999" leftmargin="0" topmargin="0" marginwidth="0" m +arginheight="0"> <form name="frmHome" method="POST" action="upload.cgi" enctype="multip +art/form-data"> <table width="780" cellspacing="0" cellpadding="0" border="0" align="c +enter"> <tr> <td height="100"> <img src="../imgs/banner.jpg" width="100%" height="100%"></td> </tr> </table> <table width="780" cellspacing="0" cellpadding="0" border="0" align="c +enter"> <tr> <td bgcolor="#CCCCCC" height="250" valign="top" width="160"> <table width="160" cellspacing="0" cellpadding="8" border="0"> </table> </td> <td bgcolor="#eeeeee" height="250" valign="top"> <table width="610" cellspacing="10" cellpadding="0" align="cente +r" border="0"> <tr> <td valign="top" class="text"> <div><p>File to Upload: <input type="file" name="file" / +></p></div> <div align="right"><p><input type="submit" name="submit" + value="Submit" /></p></div> </td> </tr> </table> </td> </tr> </table> <table width="780" cellspacing="0" cellpadding="0" height="40" border= +"0" align="center"> </table> </form> </body> </html> EOD }

        Thanks a lot!

        I would like to find out, has anyone tried the codes yet. Are they working in apache server or is there anything wrong with my codes. Cos I just can't to get it running in the monkey web server. I'm running in an embedded environment, thus is trying a light weight server

        Would appreciate if anyone would show me some light. Thanks!