Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I would check some of the following:
  • Ownership and/or permissions issues
    Just because you're able to telnet in and execute a program, or read a certain file, doesn't mean that your web server will be able to do the same. Typically web servers run as a restricted user (such as "nobody") so that they can't be tricked into overwriting files in important places, or reading something they shouldn't be able to read. Check to be sure your script has appropriate permissions (typically octal 755) to be run by the general public. Perl scripts should be executable *and* readable.
  • Current working directory
    Probably not an issue in this case, since your web.templates file is in your cgi-bin directory and you're explicitely specifying the path to your other binary. In many cases, though, this is an oversight. CGI scripts are typically executed with a CWD of the CGI directory.
  • Environment settings
    If your script depends upon certain environment settings to execute correctly, be sure those are set up or worked around in your CGI script. Specifically, if your script executes other apps or programs in your path, be sure your PATH is set up correctly (and explicitely, don't just append) to locate these other scripts, or specify an absolute path to the other binary you wish to execute.
  • If all else fails, check your error logs
    Most binaries print things to STDERR when they fail. If this is running under your CGI script, you may not see the error messages in your browser (though if you're using the CGI module, check out CGI::Carp).

In reply to Re: Calling a method inside CGI script using system calls by Fastolfe
in thread Calling a method inside CGI script using system calls by Anonymous Monk

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 having a coffee break in the Monastery: (6)
As of 2024-03-28 14:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found