Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Problems with file uploads in Perl CGI.pm

Problems with file uploads in Perl CGI.pm
Thread Tools
Fresh-Faced Recruit
Join Date: Mar 2000
Location: Sunnyvale, CA, USA
Status: Offline
Reply With Quote
Apr 23, 2007, 09:36 PM
 
I'm trying to debug a perl script on MacOS Server 10.4.9. I'm using CGI.pm to perform file uploads, but I'm not getting any data from the file. I suspect I may be looking at an apache configuration error, but I just don't know my way around this stuff well enough to try it down.

Has anybody out there run into this problem before?

Here's a code snippet:
use CGI
my $q = new CGI;
...
my $file = $q->param( "file" );
my $fh = $q->upload( $file );
my $buffer;
my $data = "";

while (read($fh, $buffer, 16384)) {
$data .= $buffer;
}

No data ever gets loaded.
Paul Israel, Senior SmartyPants
Cyber Palace, Sunnyvale, CA
Disclaimer: "Who, me? I wasn't even there!"
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:01 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2