LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-30-2005, 05:16 PM   #1
jagman
LQ Newbie
 
Registered: Feb 2005
Posts: 17

Rep: Reputation: 0
Exclamation exec a C prg in a CGI Perl script


Good Day to all of you.
Im starting to study Perl languaje for creating some CGI scripts.
Im trying to execute a C program that I made, inside the CGI script , and take the results from the C program (some graphics made with the gdc library and some data) and print it on a HTML document.
My question is how do i execute or run a C program inside a CGI Perl script?

I already tried a call to system and exec the C program; the C program executes during a certain amount of time chosen by the user.
 
Old 05-31-2005, 10:08 AM   #2
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
With the "system" call.
 
Old 05-31-2005, 10:40 AM   #3
jagman
LQ Newbie
 
Registered: Feb 2005
Posts: 17

Original Poster
Rep: Reputation: 0
I already tried the system call and it work but the problem is that the C program that I need to execute has to be executed by root. When the server tries to exec to C program via the system call, the execution fails.
How can i give the server Apache the permision to execute the C program as a root.?
And what will be the consecuences of enabling the server to do exec as root?
 
  


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
trying to add cgi-bin perl script. shizzle Linux - Networking 7 05-19-2005 01:24 AM
CGI/Perl script problems. Randvegeta Linux - Software 8 12-30-2004 12:24 AM
cgi-bin error regarding perl script hamish Linux - Software 11 12-09-2004 10:16 AM
How to Call a C program from Perl CGI Script anoop_cn Programming 1 05-11-2004 04:37 PM
Need Help With My Perl/cgi Authentication Script dutch357 Programming 0 04-11-2003 09:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:55 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