Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: System and CGI - File Created but not the Content

by bart (Canon)
on Sep 18, 2007 at 10:59 UTC ( [id://639610]=note: print w/replies, xml ) Need Help??


in reply to System and CGI - File Created but not the Content

It seems to me like the shell command line you calls with system did work, but that the program you tried to call did not. That way you can indeed end up with an empty file.

Try adding capturing for STDERR too, redirecting it to a file of its own, with 2>$errfile. I bet you will find an error message in it, after you ran the script.

Replies are listed 'Best First'.
Re^2: System and CGI - File Created but not the Content
by monkfan (Curate) on Sep 18, 2007 at 12:21 UTC
    Hi bart,
    You are right. I tried this command
    my $errfile = "errlog.txt"; system("/home/monkfan/bin/ameme /path/to/inputfile.txt param1 2> $errf +ile");
    The $errfile only gives this single line:
    Short POST input.
    However I don't know what does it mean. Tried to google but of no avail.
    Any idea? Or is there other way to get more complete error message?

    Regards,
    Edward
      It seems to me like your program runs, but that it doesn't like the input it gets. At least, the error message appears to come straight from that program. You'll have to check its documentation to understand exactly what this error message may mean.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://639610]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2024-04-25 05:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found