in reply to Failed System/Exec Call under Right Permission with CGI
In other words: make your whole text your first parameter. Quote it.
If on Unix — and it looks like you are — then take a look at String::ShellQuote. It looks to me like that's a safe catch-all way to get your whole string into your script.
Another way to make sure your data gets though uncorrupted, is to use piping. Make the data come through the child script's STDIN. Thus, replace
with
Untested, but basically, something like that.open SYSTEM, "| perl prn_to_file.pl > ../results/output.txt"); print SYSTEM $param1; close SYSTEM;
And finally, I think nothing works just because your user has no rights to write to the "../results" directory — I bet the CGI isn't run under the user name "myname". That's what permissions "drwxrwxr-x" tell me: no "w" for "world".
|
|---|