in reply to CGI/Perl prob
Some background. This was originally in an email sent to me and I sent this person here because I didn't see the problem offhand. Here's the snippet that he's trying to run:
open(TMP, " cat $filename | extract-line |") || die "Can't open SILC p +rocess"; $output = join("\n", <TMP>); close TMP; print($output);
However, I didn't notice the last line:
i am also sure that my program works, because the same code lines work if i use them in a normal Perl script context (i.e. not via an html form).
If I understand what is written here, that means this runs from the command line but not from an HTML form. My question: are permissions set correctly? Your Web server will typically execute CGI scripts with lower permissions than you will have from the command line. This could be causing the problem.
Quick question: where are you getting the $filename from? This could be a security hole if you're getting the name from the Web form.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|