in reply to Re^3: Commenting out carpout causes script to hang
in thread Commenting out carpout causes script to hang

Well, I went and ran the script by telnet to get all the output. There was one line with a missing semim-colon. Fixed it, but made no difference.

Problem is that to run properly, it needs a couple of form values plus the .htaccess username out of $ENV{'REMOTE_USER'}, so I can't get it to run completely via telnet - or at least if it's possible, I don't know how.

  • Comment on Re^4: Commenting out carpout causes script to hang

Replies are listed 'Best First'.
Re^5: Commenting out carpout causes script to hang
by ikegami (Patriarch) on Oct 10, 2007 at 16:59 UTC

    CGI (the module) scripts can be run be from the prompt. See the "DEBUGGING" section.

    Or you could add statements that print the script's progress to a log. Don't forget to (auto-)flush.

      OK, just read the debugging section of CGI.pm - very cool. Thanks. That gets the parameters set.

      But the script uses the .htaccess username to identify the records to retrieve and gets it like this:

      $username = $ENV{'REMOTE_USER'};
      and I dont see in the documentation how to get that from the command line.


      UPDATE: But nevermind - I'll just set the username programmatically temporarily.

        One way in bash:

        REMOTE_USER=ikegami example.cgi ...