CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Uploading a File Onto Apache Server

 



gankl
Deleted

Mar 20, 2001, 8:45 AM

Post #1 of 3 (372 views)
Uploading a File Onto Apache Server Can't Post

Hi
Would appreciate if someone is able to give some light on my problem in Perl programming.

I have the following codes to read a binary file from local harddisk and upload to the web server.

open (UPFILE,">$upload_dir/$cgi_cfn{\"file\"}");
binmode (UPFILE);
print UPFILE $in{"file"};
close (UPFILE);

The code works fine on a Apache web server running on Linux. However, when I have the same code running in a Apache web server running on Windows 98 (with Perl 32), the program runs into error.

Any idea why the code does not run. What do I need to change?

Help appreciated!

Thanks.



Jasmine
Administrator / Moderator

Mar 21, 2001, 5:37 AM

Post #2 of 3 (364 views)
Re: Uploading a File Onto Apache Server [In reply to] Can't Post

What's the error?



gankl
Deleted

Mar 21, 2001, 6:43 AM

Post #3 of 3 (362 views)
Re: Uploading a File Onto Apache Server [In reply to] Can't Post

Hi
Thanks for your response!
The following errors were encountered:
a) $cgi_cfn{"file"} field is empty although I'm sure the variable name is right. I've the same set of code running fine under Apache linux;
b) when I assign a selected file name directly to the variable, the file is created in Apache server but without any content! empty!

Thanks again.


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives