Sponsored Content
Top Forums Shell Programming and Scripting stuck in perl cgi to upload a file to server Post 75444 by cbkihong on Saturday 18th of June 2005 09:58:22 AM
Old 06-18-2005
Normally that should be it. Because what upload() returns is a filehandle you should be able to read it right away (provided a valid filehandle is returned). But now obviously the filehandle is undef. That was why I tried to make the guess that probably your temporary directory could not be written into, and so cannot be open()ed so no valid filehandle is returned.

Try this. Log the output of

$q->cgi_error

as the program proceeds. See if you get any error messages before or around the upload() method.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

upload excel file contents to server

Hi I have an excel file with only 5 rows .I want to uplaod those 5 rows to a database using a shell script.Is this possible.If so where do i start. Thnks (1 Reply)
Discussion started by: magikminox
1 Replies

2. Shell Programming and Scripting

upload file to webdav server

Hi all i have a such question this is my shell script my script must upload file to webdav server ////////////////////////////////////////////////////////////////////////////////////////////////////////////// #!/bin/sh ###... (1 Reply)
Discussion started by: knut
1 Replies

3. IP Networking

upload file using cgi

I am using cgic lib to implement file upload, but the speed is very very slow... what is even worse, the file uploaded to my website is corrupted. pakages captured by wireshark: ... 9606 56.258491 192.168.7.77 192.168.7.235 HTTP Continuation or non-HTTP traffic... (5 Replies)
Discussion started by: vistastar
5 Replies

4. Web Development

problem with exporting vairable from one perl cgi to another perl cgi script while redirecting.

Can anyone tell me how to export a variable from one perl CGI script to another perl cgi script when using a redirect. Upon running the login.pl the user is prompted to enter user name and password. Upon entering the correct credentials (admin/admin) the user is redirected to welcome page. My... (3 Replies)
Discussion started by: Arun_Linux
3 Replies

5. Shell Programming and Scripting

Script to upload latest file to other server via FTP

Hello, I have a script that finds the latest version of a file in a folder on my Minecraft server. I'm trying to come up with something that will then FTP that file over to my fileserver. Here's what I have that finds the newest file: find /home/mc/archive/sbhouse -type f -mtime +45 -exec... (7 Replies)
Discussion started by: nbsparks
7 Replies

6. Shell Programming and Scripting

Generate file and Upload to SFTP server.

Xperts, My requirement is something like this, I have a sql script which i need to embed in a shell. The sql (oracle) script will generate a .csv file in some Unix directory. the approximate file size is around 10 mb which i need to upload to an sftp server. My concern here is how to make... (5 Replies)
Discussion started by: Showdown
5 Replies

7. Shell Programming and Scripting

Perl cgi pages out of cgi-bin folder in WINDOWS

Hi team, I have a typical problem with cgi pages in apache webserver in WINDOWS I am able to execute(display) the pages that are saved in cgi-bin folder. But I am not able to execute the pages stored in htdocs or other folder other than cgi-bin folder. Could anyone please let me know how... (1 Reply)
Discussion started by: scriptscript
1 Replies

8. Shell Programming and Scripting

Perl CGI : unable to download the excel sheet from perl cgi page

Hi All, I have written an cgi perl script that displays an image(Excel image) and when clicked on that Image I need to download a excel sheet. I made sure that excel sheet exists in the folder with the given name but still I am not able to download the sheet. print "<center><table... (2 Replies)
Discussion started by: scriptscript
2 Replies

9. Proxy Server

Upload file from desktop to UNIX server via putty

I have a requirement of following - 1. Transfer excel spreadsheet from desktop to unix server 2. Open the spreadsheet and read the sql row by row at a time 3. Run each sql on database using unix and then send output back to spreadsheet that was uploaded earlier and then transfer file back to... (12 Replies)
Discussion started by: Analabhatla
12 Replies
lg_intro(1)						      General Commands Manual						       lg_intro(1)

NAME
lg_intro - introduction to the looking glass INTRODUCTION
The looking glass offers a web based interface to routers to users without their needing permission to login to the router. This may be a perfect interface for customer support or less savvy folks, and many ISPs have given public access to such an interface as a "route server." DESCRIPTION
The looking glass consists of two CGI perl(1) scripts, lg.cgi and lgform.cgi, and the lg.conf(5) configuration file. Both of these scripts begin with reading the configuration file. If there is an error in the file's syntax or if the file can not be found, error messages will be displayed on standard-error. The Apache http server redirects standard-error to its error log file by default. lgform.cgi displays a html form consisting of a list of possible router commands that can be run and a scrolling list of routers that these commands may be run on. When the form is submitted, lg.cgi is run. lg.cgi begins by performing some basic checks on the arguments passed to it. If these checks pass, lg.cgi either displays cached data from a previous invocation, if that data exists and is within the cache interval, or uses clogin(1) to login to the device and execute the command. The results of the command are cached if applicable and displayed for the user. GETTING STARTED
Besides lg.conf(5), additional instructions for setting up the looking glass can be found in the README file under /var/lib/rancid/README.lg. Note that the looking glass scripts require a few perl modules not included with rancid. Rancid's configure process does not check for these. See the README file. SEE ALSO
cloginrc(5), clogin(1), lg.conf(5) HISTORY
Rancid's looking glass is based on Ed Kern's (included by permission, thanks Ed!), which could once be found on http://nitrous.digex.net/ but has apparently been removed. Support for Juniper and Foundry devices, use of rancid's device login scripts, and additional commands and checks have been added to the original. 24 Jan 2001 lg_intro(1)
All times are GMT -4. The time now is 05:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy