Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 12-22-2003, 10:39 PM   #1
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


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 ..


Old 12-29-2003, 03:34 AM   #2
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.


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

All times are GMT -5. The time now is 11:29 AM.

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