in reply to Trying to allow cgi script to access htpasswd protected files.

I've given this some more thought. I'm afraid I'm at a bit of a loss, as I'm not privy to your entire script. So based on the info I have. I can only best suggest. That you use a session-based auth setup. One that performs a re-direct, if not already logged in. That way, if you attempt to initiate your Image::Magick script when not already loggen in. You get a redirect to the logon page. Then, after being looged on, the page provides a link to your Image::Magick script.

Not the most specific answer/solution. But without a bit more info. That's the best I'm prepared to offer.

HTH

--Chris

#!/usr/bin/perl -Tw
use Perl::Always or die;
my $perl_version = (5.12.5);
print $perl_version;
  • Comment on Re: Trying to allow cgi script to access htpasswd protected files.

Replies are listed 'Best First'.
Re^2: Trying to allow cgi script to access htpasswd protected files.
by Your Mother (Archbishop) on Nov 14, 2013 at 04:24 UTC

    kschwab’s answer was on point and probably right/workable; though without https:// also a bit dangerous. That style of URL works fine with HTTP Basic Authentication. Without LWP::UserAgent or WWW::Mechanize or other code samples, your answer is pretty hand-wavy, as they say on the innertubes.