Gossamer Forum
Home : General : Perl Programming :

Local Installed Apache / .htaccess Authentication

Quote Reply
Local Installed Apache / .htaccess Authentication
I've installed Apache 1.3.22 and ActiveState ActivePerl 5.6.1 on a machine running Windows ME. Apache purring like a new born kitten (with sharp claws), and CGI executes / behaves properly. The one problem I'm having is in regard to .htaccess authentication. I created a local directory and setup .htaccess password protection. I then created a password file via a CGI-Perl script I wrote (simply using Perl 'crypt' function). When I attempt to browse the password protected directory, I'm prompted to submit credentials - as expected. Username is recognized (found), but password is not accepted (password mismatch). Appears to be encryption conflict - Windows vs *nix? .htaccess file follows:

Code:
AuthUserFile C:/.htpasswd
AuthName "Members"
AuthType Basic

<limit GET PUT POST>
require valid-user
</limit>

Ideas?


Cheers - Dan Cool
Quote Reply
Re: [dan] Local Installed Apache / .htaccess Authentication In reply to
Issue resolved. You need to use MD5 encryption algorithm on Windows platform. When you use htpasswd.exe, the program defaults to MD5 on Windows box instead of crypt().


Cheers - Dan Cool


----
Cheers,

Dan
Founder and CEO

LionsGate Creative
GoodPassRobot
Magelln