LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 12-22-2003, 09:39 PM   #1
avios
LQ Newbie
 
Registered: Oct 2003
Posts: 16

Rep: Reputation: 0
Executing a program on server using CGi/PERl ?!


Hi guys and gals ,

I would like to exec a program from the server after the user clicks a button or link on a webpage . I know its possible and I did try both CGI and PERL by using the exec cgi and exec cmd commands.

I had better luck with PERL as if i execute the perl script like so

perl avi.pl

I can see the script executing the program....

But when i use the same on the browser it does not work .........

I also know that apache has an option for CGI to allow exec when enabled

So I did modify it to OPtion CGIexec etc etc ..........

Still nothing ..............

Plz help .............

All I need is to execute a program on the server ........... No need to see output or what so ever on the browser ........... just execute ..


regards


 
Old 12-29-2003, 02:34 AM   #2
jalal
Member
 
Registered: Aug 2003
Location: .bh
Distribution: Gentoo
Posts: 188

Rep: Reputation: 30
This perl script will need to be in the right directory (e.g. /var/www/cgi-bin) and have the right permissions setup (e.g. 755) for it to run as a CGI app.

Sometimes you also need to send something to the browser, so, you can tell the script to send a "Content-type" header followed by an empty line.
 
  


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
CGI File Not Executing on Apache Server kaplan71 Linux - Software 2 10-21-2004 07:12 AM
CGI / Perl Internal Server Error newuser455 Linux - General 10 09-26-2004 02:50 AM
How to Call a C program from Perl CGI Script anoop_cn Programming 1 05-11-2004 04:37 PM
Total Newbie... Perl program install help for CGI::KWIWI futuremed Linux - Newbie 0 02-29-2004 11:14 AM
Gtk gui on a cgi perl program bruce1271 Linux - Software 2 12-08-2003 05:54 PM


All times are GMT -5. The time now is 08:51 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration