Re: need your helpppp




harryfmudd [AT] comcast [DOT] net wrote:

I'm no expert, but ...

It seems to me that the first thing is to figure out why the exec fails.
If you read the documentation (hint: perldoc -f exec) you'll see
something like the code I have inserted. There are differences between
executing a Perl script from the command line and executing it as a CGI
script, which include the setting of the PATH variable, and the
accessability of files in general. Dumping the status of the exec call
will help you diagnose this.

But I predict that you will find a second problem when you get the first
one sorted out, because I predict that when you run try.cgi from the
shell, you will not get the HTML output, except for the headers, if the
exec succeeds. See the documentation on exec for the answer to this one,
too.

Tom Wyant

Tom, thanks for your help and reply. This time after I changed the line

exec ("p1.cgi") to
exec ("p1.cgi") or print "failed to exec p1.cgi: $!";

after execute by browser I got the line :
Failed to exec p1.cgi: No such file or directory
displayed.

I guess you are right, and the browser can't find the file p1.cgi
So then I guess the set of path is wrong.
Could you tell me how I should set the path??

.



Relevant Pages

  • Re: Problem in calling c programs and compiling them in tcl/tk
    ... using exec gcc filename.c and later exec ./a.out filename.c. ... the execution of a command that might generate a Tcl error. ... Be sure to read the documentation for exec -http://wiki.tcl.tk/exec-for information about catch, ...
    (comp.lang.tcl)
  • Re: Practice of using fork()
    ... >> internal implementation and not on the interface or documentation. ... But what if you never exec()? ...
    (comp.unix.programmer)
  • Re: Triple quoted string in exec function ?
    ... exec() is no longer a keyword; ... Though that was the only documentation of it I found in a brief ... AIUI it isn't meant to be safe, ... Another example of a security hole: ...
    (comp.lang.python)
  • Re: Practice of using fork()
    ... > internal implementation and not on the interface or documentation. ... If, after a 'fork', neither process calls 'exec', you have a lot ...
    (comp.unix.programmer)
  • Re: Python reference
    ... btw... ... had to call exec*() in another language before... ... and I just wanted to say that I find the Python documentation fantastic as ... documentation, but just as Python applauds to every programmers common sense, ...
    (comp.lang.python)