LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-25-2004, 07:07 PM   #1
elmerliu
LQ Newbie
 
Registered: Aug 2004
Distribution: Fedora Core 1
Posts: 11

Rep: Reputation: 0
Question Need help for CGI


Hi all,

I was asked to create a form that capture linux command to be sent to a perl program that will execute that command locally on the server, capture the output of that command,create a web page with that output ,and send it back to the caller as a new webpage. I am totally new to CGI and I just wondering how can I capture arbitrary linux command and then get result?

THANKS!
 
Old 09-25-2004, 07:49 PM   #2
d0odman
Member
 
Registered: Sep 2004
Location: CA, USA
Distribution: Slackware 10.2
Posts: 132

Rep: Reputation: 15
Server Side Includes

CGI would be the way to go, but an easier approach would be to use SSI which is built in to Apache.

I can't help you with coding up a forms HTML page, but I am absolutely certain you can put linux commands in to your HTML that will run on the server locally as the user that Apache runs as (normally nobody).

Look through the Apache dox for SSI and Server Side Includes.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl CGI:Can't locate CGI.pm supermyself Programming 13 09-10-2007 06:22 AM
CGI to work out side of cgi-bin? crashedspine Linux - Newbie 13 09-02-2004 08:49 PM
apache v2.0.44 + cgi ; securing cgi-support in apache markus1982 Linux - General 0 01-20-2003 01:03 PM
about CGI... raymond Linux - General 2 11-16-2002 10:32 AM
http://www.burstnet.com/cgi-bin/ads/ad7954a.cgi/3980/RETURN-CODE rverlander LQ Suggestions & Feedback 1 06-07-2002 07:35 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration