in reply to invocation of a ghost file

@ARGV is always empty for CGI scripts. (Well, it would be set for ISINDEX queries, but noone uses those anymore.) You'd be better off logging $ENV{QUERY_STRING} and $ENV{PATH_INFO}, or even the entire environment.

Replies are listed 'Best First'.
Re^2: invocation of a ghost file
by arkturuz (Curate) on Feb 15, 2006 at 16:49 UTC
    I thought that something calls 'undefined' with CL arguments so I decided to print @ARGV (and %ENV).

    But, the problem is what is invoking /some/path/undefined?
    It started when I added a lot of new code, so I believe it is a bug somewhere, but I can't think of a bug which would generate such behaviour. I don't invoke other programs in that CGI app at all.

      It wasn't invoked from the command line. If it was, it wouldn't be in your web server's logs.

      The web server attempted to invoke the script, surely via CGI (which is why @ARGV is empty).

      Indirectly, a web client attempted to invoke the script.

      Even more indirectly, and assuming the referrer is accurate, a web browser was redirected there by http://test-server/cgi_app.pl, or a user followed a link outputed by http://test-server/cgi_app.pl.

      That's all that can be known from the information given. Knowing what's the last thing that IP address requested might help you.

        A user followed link generated by cgi_app.pl which allways generates HTML links to itself.

        This app worked for months without such errors, and after I added some source code (in a new module), this error started to appear. And it only appears when this new source code is executed although it doesn't really differentiate from the old code (the whole thing is SELECTing and UPDATEing a database).