in reply to Best practice for letting my CGI scripts access another password protected CGI script?

... . Help!

Try these checklists :) CGI Help Guide , Troubleshooting Perl CGI scripts

Maybe your LWP running as user apache doesn't have permission to make internet connections, or maybe something else entirely, check the logs

  • Comment on Re: Best practice for letting my CGI scripts access another password protected CGI script?

Replies are listed 'Best First'.
Re^2: Best practice for letting my CGI scripts access another password protected CGI script?
by OfficeLinebacker (Chaplain) on Oct 29, 2013 at 23:56 UTC
    I think this is more of an LWP/credentials problem than a CGI problem. The system has about ten CGI scripts, but the only one that's giving problems is one that instantiates an LWP::UserAgent object and tries to call one of the other CGI scripts.

    >check the logs

    Well the logs are telling me that the request has no credentials associated with it, so time to look into that.

      Well the logs are telling me that the request has no credentials associated with it, so time to look into that.

      Looks that way :)

      use LWP; my $headers = HTTP::Headers->new(); $headers->authorization_basic('user', 'pass'); my $request = new HTTP::Request(GET => $url, $headers); $request->dump; __END__ GET - Authorization: Basic dXNlcjpwYXNz (no content)