in reply to Re^2: Failed System/Exec Call under Right Permission with CGI
in thread Failed System/Exec Call under Right Permission with CGI
Next thing is to use the multi-arg form of system. This bypasses shell processing and hence protects against the scenario I alluded to above. So you'll want something like this:
my @args = ('/path/to/prn_to_file.pl', $param1, '/path/to/results/outp +ut.txt'); system(@args) == 0 or die "Blah blah...:$!\n";
Three things to note:
Cheers,
Darren :)
Update: - fixed code example (thanks Corion).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Failed System/Exec Call under Right Permission with CGI
by neversaint (Deacon) on Jul 19, 2006 at 09:47 UTC | |
by McDarren (Abbot) on Jul 19, 2006 at 10:16 UTC | |
by neversaint (Deacon) on Jul 20, 2006 at 03:16 UTC | |
by McDarren (Abbot) on Jul 20, 2006 at 04:07 UTC | |
by neversaint (Deacon) on Jul 20, 2006 at 05:57 UTC | |
|