Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Well, since you don't seem to want to do this over SSH/scp/FTP, let me just point out that it is very easy to do this. Just store the received form data in some file, compile, redirect STDERR and STDIN to some other file or program, and return that to the browser.
Whether your apache is authorized to access any files gcc might need depends on your system, but usually apache is configured to have as few privileges as possible, so you might want your CGI script to call some other, non-CGI script via 'sudo'. That way, you can easily and securely define just exactly what permissions you want to give the script that's going to compile your script, without altering apache's config or access-privileges. Just make sure to include "NOPASSWD" in your sudoers file, and put your CGI script in some password-protected zone (using .htaccess, for example), because letting strangers compile stuff on your machine doesn't sound as a goog idea.

In reply to Re: How Would I access a C++ compiler remotely through a Perl CGI Script? by schweini
in thread How Would I access a C++ compiler remotely through a Perl CGI Script? by Spidy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-22 02:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found