in reply to Re: Safe open() with taint mode not working?
in thread Safe open() with taint mode not working?

My explanation may have been a little unclear but I do not see where you get the three different instances from.

Basically I am using the above code in a cgi script and the filehandle <LKUP> never has a value. When I run this from command line it executes as it should as I said in my first post but when I run it inside my cgi script and try to print this data to the web page the filehandle is null.

  • Comment on Re^2: Safe open() with taint mode not working?

Replies are listed 'Best First'.
Re^3: Safe open() with taint mode not working?
by dave_the_m (Monsignor) on Jan 14, 2005 at 22:29 UTC
    Ah I see. The thing to do is to add debugging warns everywhere around that code (eg  warn "in child, about to exec...\n", and see what makes it into the web server's error log. Also, you should check for open() returning an undef value, and you should check for exec failing - in both cases, printing out $! to STDERR.

    Dave.