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

Re: mysterious backticks/system() behavior in CGI script

by turnstep (Parson)
on Apr 10, 2000 at 21:39 UTC ( #7250=note: print w/replies, xml ) Need Help??

in reply to mysterious backticks/system() behavior in CGI script

Quick thoughts:

Try looking at the $! variable in your final else loop to see *why* the open failed. Rewrite the open line as:

if (open IMAGE_FILE, "$image_output.gif")

Run the script with a -wT and see if that tells you anything.

Check the path that the script runs as. This will be different from the command line path.

Replies are listed 'Best First'.
RE: Re: mysterious backticks/system() behavior in CGI script
by jwielgos (Initiate) on Apr 11, 2000 at 02:22 UTC
    Thanks for the -T tip, there were indeed some tainted variables. I fixed my $ENV("PATH"), and switched everything to use system(@list) instead of ``s. And I still don't know why, but between those two, somehow the problem went away. I'm not going to question a miracle, but there's definitely a lesson here: don't use ``s unless you really have to.. Anyway thanks everyone. Monks rock the house!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2022-05-17 08:09 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (65 votes). Check out past polls.