473,387 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

CGI upload files without using CGI.pm

109 100+
Hi..

Does anyone know how to do file uploading with CGI using perl but not using the CGI.pm module?

Thanks!
Jun 13 '07 #1
7 2076
miller
1,089 Expert 1GB
I've seen it done before a long time ago, but I always use CGI.

If you're really curious you could always inspect the source code to the CGI module.

- Miller

PS,
If this is anything more than a curiousity, then I would not suggest that your pursue it.
Jun 13 '07 #2
KevinADC
4,059 Expert 2GB
ignoring some security issues:

Expand|Select|Wrap|Line Numbers
  1. open (FILE,">path/to/upload/folder/$in{file}");
  2. binmode (FILE);
  3. print FILE $in{file};
  4. close (FILE);
where $in{file} is the name of the file field in your form.
Jun 13 '07 #3
skyy
109 100+
I've seen it done before a long time ago, but I always use CGI.

If you're really curious you could always inspect the source code to the CGI module.

- Miller

PS,
If this is anything more than a curiousity, then I would not suggest that your pursue it.

Hi... its not out of curiousity.. but due to facing problem installing my cgi module so i am looking at another alternative.

Seems like its not going to be an easy way.

Is is possible for me to copy the CGI file and include it inside my source code?

eg: use /lib/perl5/5.8.8/CGI.pm
Jun 14 '07 #4
miller
1,089 Expert 1GB
Hi... its not out of curiousity.. but due to facing problem installing my cgi module so i am looking at another alternative.
What method are you using to install the CGI modules?

Please include the system that you are running under: OS, perl version, etc.

- Miller
Jun 14 '07 #5
KevinADC
4,059 Expert 2GB
are you using "wamp" or some bundled application? One of those bundled applications is serioulsy flawed when it comes to the perl distribution, and you can't add modules. I can't remember which one it is though.
Jun 14 '07 #6
skyy
109 100+
What method are you using to install the CGI modules?

Please include the system that you are running under: OS, perl version, etc.

- Miller
Hi..

I posted on another forum regarding installing perl on arm-linux. Cant seems to find a solution. I can run very basic perl program. But when i try to install CGI module it gives me error in installing.

Perl v5.8.8
Arm-linux
kernel 2.4.20

I downloaded the CGI module and untar it. when i try to install using:

perl Makefile.PL

Error in installing perl module:
Attemp to free unreferenced scalar..

Hence i cant continue with the installation.
Jun 14 '07 #7
KevinADC
4,059 Expert 2GB
The CGI module comes with nearly all distributions of perl. I don't know why you would not already have it installed.
Jun 14 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
5
by: Thomas Brooks | last post by:
Hi there.... I have an ASP routine that I'm writing which updates an Access database with a user name, the file name, etc. all done through parameter processing and SQL functions. I do not...
1
by: PeterB | last post by:
Hi! I'm using Pure ASP File Upload (http://www.asp101.com/articles/jacob/scriptupload.asp) to upload a file from a client to a server. I am testing both on a local IIS and a remote server. The...
2
by: Kenneth Myhra | last post by:
Hi all, We are trying to make an ISAPI Filter, in .NET by implementing the IHttpModule interface, that will authorize the request for certain binary file types (GET), this is working fine. But we...
1
by: TK | last post by:
I have a file upload control to allow a user to select/upload a file to the server. They need to upload x number of files in one shot because they have to confirm that they are uploading x number...
10
by: Alphonse Giambrone | last post by:
I am trying to develop a web service to accept a file uploaded via http post from a vba (Access) application. Thanks to helpful links in a vb newsgroup and my previous work with WinInet api I was...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
7
by: pbd22 | last post by:
hi. i am having probs understanding how to grab a file being uploaded from a remote client. i am using hidden input fields for upload such as: <input id="my_file_element" type="file"...
6
by: =?ISO-8859-1?Q?J=F8rn?= Dahl-Stamnes | last post by:
I have a strange problem when uploading a PDF document to a web-server. When I try this to a web-server running Apache 2 on a FC 4, it fails. Firefox says that the document contain no data. If I...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.