Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: system call

by haoess (Curate)
on May 10, 2004 at 13:24 UTC ( #352040=note: print w/ replies, xml ) Need Help??


in reply to system call

You didn't tell us, what goes wrong.

Your code is syntactical correct. But:

  • Where does $n come from?
  • Where does $dump_path come from?

They may contain special shell characters like &, ;, `, ', ", |, *, ?, ~, <, >, ^, (, ), [, ], {, }, $ and \.

Your CGI-script mostly does not run under the same UID as your command line script, so you should think of:

  • Is your "CGI"-user able to execute /usr/local/bin/dcm_dump_file?
  • Does "he" have enough rights to write into $dump_path.'PCfiles/dumpfile'?

To examine your situation, you should look at possible errors and use backticks with redirecting STDERR to STDOUT:

# see what happens print `$your command 2>&1 > output`;

-- Frank


Comment on Re: system call
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2014-09-21 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (172 votes), past polls