HTTP_HOST clarification

2001-09-09 Thread Justin Rains

   I forgot to mention I am trying to access the http_host variable through an 
authentication script..

Thanks!
Justin



==
Justin C. Rains, President WSI.com Consulting

_
Get your own FREE branded portal! Visit www.wsicnslt.com to learn more



Getting to the $ENV{HTTP_HOST} variable

2001-09-08 Thread Justin Rains

   Hi all. I am relatively new to mod perl. I have a script that works using the 
following:

my $dm = $s->server_hostname;

But in my normal perl scripts I am now using the HTTP_HOST value.. I tried this:

my $env = $r->subprocess_env;
%ENV = %$env;
my $dm = $ENV{'HTTP_HOST'};

without any luck. Is it possible to get to the HTTP_HOST value in mod_perl? If I need 
to send my complete code just e-mail me and let me know.. Thanks!

Justin

==
Justin C. Rains, President WSI.com Consulting

_
Get your own FREE branded portal! Visit www.wsicnslt.com to learn more



Errors when trying to use AuthAny.pm

2001-07-11 Thread Justin Rains

Hi all. I am relatively new to mod_perl so try to bear with me. I am trying to use 
the AuthAny.pm module to provide some basic authentication. First off.. Do I put it in 
the same directory as Registry.pm? That is where I have it now. In my httpd.conf file 
I put the following in:


AuthName Test
AuthType Basic
PerlAuthenHandler AuthAny
require valid-user



I am running on a cobalt raq 3. Here is what I have in AuthAny.pm:

package Apache::AuthAny;
# file: Apache/AuthAny.pm


use strict;
use Apache::Constants qw(:common);


sub handler {
my $r = shift;

my($res, $sent_pw) = $r->get_basic_auth_pw;
return $res if $res != OK;


my $user = $r->connection->user;
unless($user and $sent_pw) {
$r->note_basic_auth_failure;
$r->log_reason("Both a username and password must be provided", $r->filename);
return AUTH_REQUIRED;
}


return OK;
}


1;
__END__

The error log message is:
[Wed Jul 11 09:04:59 2001] [error] (2)No such file or directory: access to /tools/ 
failed for nr2-216-196-142-76.fuse.net, reason: User not known to the underlying 
authentication module

Am I missing something here? I am using the standard apache that came with the raq.

Thanks for any help!
Justin

==
Justin Rains
WSI.com Consulting
http://www.wsicnslt.com/

_
Buy gift certificates online @ http://gc.portalplanet.com/