Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to run script through CGI? Post 302998168 by Corona688 on Friday 26th of May 2017 12:10:04 PM
Old 05-26-2017
This won't work right in CGI for a few reasons; first, CGI has no keyboard input and can't read a number from the user. Second, you usually can't - and definitely shouldn't - write to the current folder in a CGI script.

Third, you never, ever want a CGI script to be running self-generated code.

How to run it from CGI also depends on your web server. What is your CGI folder?

Last edited by Corona688; 05-26-2017 at 01:22 PM..
 

10 More Discussions You Might Find Interesting

1. Cybersecurity

Run CGI As User..?

Hi, My server is set up so that all cgi scripts are run as user nobody, instead of the user's username. Now I know you can use cgi-wrappers, but someone please give me detailed information, on how to make ALL scripts run on the server to by default, run as the user? And not to run as user... (1 Reply)
Discussion started by: jason6792
1 Replies

2. Shell Programming and Scripting

CGI passing arrays/hashes to another CGI script

If I have a Perl CGI script (script01), which fills an array(s) with information and outputs a HTML page with a link to another CGI page (script02); is there anyway to pass the array(s) from "script01" to "script02" when the page visitor clicks the link? Hope that makes sense! :) (2 Replies)
Discussion started by: WIntellect
2 Replies

3. UNIX for Dummies Questions & Answers

Run ksh script from cgi

Hi, I'm developing a system which requires me to run a ksh script from within a cgi script. What sort of syntax will I need to do this, I'm sure it's simple but can't find out how anywhere! Thanks. (2 Replies)
Discussion started by: hodges
2 Replies

4. Shell Programming and Scripting

how to run cgi -script on Cygwin ?

All, I would like to run a cgi script in cygwin which i have installed in WinXP. My CYGWIN directory structure is /var/www/ drwxrwx---+ 2 user Users 0 Nov 23 16:24 cgi-bin drwxrwx---+ 3 user Users 0 Oct 22 17:21 htdocs drwxrwx---+ 3 user Users 0 Oct 22 17:22 icons and another... (1 Reply)
Discussion started by: jambesh
1 Replies

5. Shell Programming and Scripting

Run system command in perl cgi

Hi guys, got a problem with a perl cgi script over here. I need it to run a system command to get the status of a process. Unfortunately the process is owned by a specific user and only this user can get its status. So i tried running the command from the perl cgi with "su", but then i get the... (12 Replies)
Discussion started by: polki
12 Replies

6. Web Development

Apache, cgi script run twice when ssl, once when not ssl

I have interesting problem. https:/host/some/x.cgi - this script has run twice when I call this url But http:/host/some/x.cgi work fine, only once. Output is text/plain. If I change output format to the Content-type text/html, then both urls works fine - executed only once. (2 Replies)
Discussion started by: kshji
2 Replies

7. Homework & Coursework Questions

Run Program from Bash CGI-Script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: This is a problem I am having with my 2 semester senior project. I have a LAMP server running Ubuntu 9.10 with... (8 Replies)
Discussion started by: JMooney5115
8 Replies

8. Shell Programming and Scripting

Run SCP in backgroung using Perl CGI

Hi I am Run Perl CGI Script. In which i am running SCP Command. But I want that command to be run into background and exit the script. But Still Web page waiting for Finish the script. I m doing like : system ("scp -r machinename:/path/to/file/for/copy/ /path/for/ destination/directory/ &");... (3 Replies)
Discussion started by: Navrattan Bansa
3 Replies

9. Shell Programming and Scripting

Run command through html+cgi in bash

Hi everyone, I want to kill process through the web, so I create html page with single bottom that run kill command in shell script with CGI. Here is html code: <td><form METHOD="GET" action="http://IP:port/cgi_bin/script.cgi" > <input type="submit" value= "Submit" > <INPUT name="q"... (7 Replies)
Discussion started by: indeed_1
7 Replies

10. UNIX for Beginners Questions & Answers

How to convert my /bin/sh script with cgi and html to run it on browser!??

Hello, I want to run this script on my CentOS 6 via browser : ________________________________________________________________________________________________ #!/bin/sh echo Username? read MY_NAME echo Provisional file name? read MY_FILE echo File NAME you want to save? read MY_FILE2... (16 Replies)
Discussion started by: juta2020
16 Replies
HOBBIT-NKVIEW.CGI(1)					      General Commands Manual					      HOBBIT-NKVIEW.CGI(1)

NAME
hobbit-nkview.cgi - Xymon Critical Systems view CGI SYNOPSIS
hobbit-nkview.cgi DESCRIPTION
hobbit-nkview.cgi is invoked as a CGI script via the hobbit-nkview.sh CGI wrapper. hobbit-nkview.cgi matches the current critical statuses against the hobbit-nkview.cfg(5) file, and generates the "Critical Systems" view. RELATION TO BBNK PAGE
This view is a replacement for the statically generated "bbnk" page provided in versions of Xymon prior to version 4.2. Although the "bbnk" pages are supported throughout Xymon 4.x, it is recommended that You switch to the newer Critical Systems view provided by this CGI. OPTIONS
--nkacklevel=NUMBER Sets the acknowledgment level for acknowledgments sent via the hobbit-ackinfo.cgi(1) page. Note that this may be overridden by the configuration of the hobbit-ackinfo.cgi utility. --env=FILENAME Loads the environment defined in FILENAME before executing the CGI script. --area=NAME Load environment variables for a specific area. NB: if used, this option must appear before any --env=FILENAME option. --debug Enables debugging output. ENVIRONMENT VARIABLES
BBHOME Used to locate the template files for the generated web pages. QUERY_STRING Contains the parameters for the CGI script. SEE ALSO
hobbit-ackinfo.cgi(1), xymon(7) Xymon Version 4.2.3: 4 Feb 2009 HOBBIT-NKVIEW.CGI(1)
All times are GMT -4. The time now is 01:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy