Re: mod_perl install on SGI

2002-08-12 Thread Stas Bekman

Tom Keller wrote:
 Greetings,
 I am trying to install mod_perl with apache_1.2.26 on and SGI running 
 6.5.16.
 
 apache was installed from the freeware.sgi.com website using their very 
 nice installer. Unfortunately, the clean up after installation seems to 
 remove the Makefile that is used by mod_perl's Makefile.
 
 So running install mod_perl from cpan, I get the question Please tell 
 me wher I can find your apache src
 [ ../apache_x.x/src]
 I can't seem to give it a path that works.
 
 I know the executable is at /usr/freeware/apache, but that gives the 
 message can't open /Makefile No such file.
 
 I've also tried using /var/inst/fw_apache which is the downloaded source 
 file. No dice.

CPAN asks for your apache '/src' dir, not the location of the binary or 
the source base dir. e.g. if you've untarred the apache source in 
/tmp/apache_1.3.26, you should pass /tmp/apache_1.3.26/src when prompted 
by mod_perl installer. See 
http://perl.apache.org/docs/1.0/guide/install.html for more info.



__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: solaris 2.6, mod_perl 1.27, apache 1.3.26, resulting server fails

2002-08-12 Thread Lupe Christoph

On Monday, 2002-08-12 at 12:41:54 +0800, Stas Bekman wrote:
 Lupe Christoph wrote:
 On Thursday, 2002-08-08 at 15:48:48 -0700, John E. Mendenhall wrote:

 I have done all you have asked.  All output appears similar.  Three files,
 including Log.xs.  Nine entries in httpd for XS_Apache__Log, as follows:

 So, where to from here?  Any ideas?

 (Stas explains bootstrapping.)

Thank you for the explanation, Stas.

 What do you get from running:
 nm httpd | grep Apache__Log

 there should be boot_Apache__Log there.

On my working Solaris version, there is:
[3497]  |464188| 732|FUNC |GLOB |0|9  |boot_Apache__Log

Sorry for telling John a too restrictive string to grep.

From Tim's explanation (which is now out of date on some technical
details, like perlmain.c), I gather that the following might be amiss
in John's installation:

xs_init() is used to introduce the statically linked XSes to mod_perl.
There must be a call to newXS for Apache::Log in it.

John, please check this:
grep boot_Apache__Log apache_1.3.26/src/modules/perl/perlxsi.c
EXTERN_C void boot_Apache__Log _((CV* cv));
newXS(Apache::Log::bootstrap, boot_Apache__Log, file);

HTH,
Lupe Christoph
-- 
| [EMAIL PROTECTED]   |   http://www.lupe-christoph.de/ |
| I have challenged the entire ISO-9000 quality assurance team to a  |
| Bat-Leth contest on the holodeck. They will not concern us again.  |
| http://public.logica.com/~stepneys/joke/klingon.htm|



Re: Mismatched Prototyped with mod_perl

2002-08-12 Thread Stas Bekman

Yair Lenga wrote:

 I've currently in the process of moving from CGI to mod_perl. I noticed several 
people that complain about Mismatched prototype warning. while most of the messages 
are caused by perl handling of function declaration, I think that some of the 
messages can be reduced by fixing 'mod_perl':
 
 The flush_namespace was not checking for empty prototypes (i.e.,function that does 
take zero parameters, like most of the constant functions). I.e.
 sub PI () { 3.1415 } was treated the same as
 sub PI { 3.1415 }
 
 I made a minor modication to the code, and that has eliminated many warnings 
(especially from libwww). I hope that someone can review those changes and commit 
them to the master source code, for the next mod_perl release).

Thank you Yair, committed.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: NTLM module

2002-08-12 Thread Gerald Richter


- Original Message -
From: Kaye-Smith Adam [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 12, 2002 4:51 AM
Subject: NTLM module


Hello ,


When I enter in an NT password it all works ok but when I use a
user/pass from the htpasswd file, the only way it will work is that I
change the above line to

AuthType Basic instead of
AuthType ntlm,Basic.


With this change I can access passwords in htpasswd  also authenticate
from an NT server but I can no longer use NTLM.

The problem is that Basic authentication requires a password from the client
which can be compared against your password file. In case of NTLM auth,
there is no password ever send over the wire, so Apache doesn't have
anything which it can compare against it's passwd file.

The solution would be to derive a class from AuthenNTLM and do the
computation of the challage and response based on the secrets in the passwd
file (you would need to store MD4 hashs of your passwords somewhere). There
is a module called Perl::AuthenNTLM which may be helpfull in doing this
task.

Gerald


-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-







RE: Compiled-in but not recognized

2002-08-12 Thread Colin


Just to update that I thankfully have this working now :)
It was a corrupted mod_perl.c file from the source tree that was causing the
issue.

Thanks.

  Hi there,
 
  On Sun, 11 Aug 2002, Colin wrote:
 
  I know this is a recurring problem but bear with me ...
 
  :)
 
  httpd -l
  Compiled-in modules:
  http_core.c
  mod_so.c
  mod_perl.c
 
  pwd?

 I think that Ged was suggesting you might have multiple httpd binaries
 on your system, and was suggesting that you verify you're running the
 binary you think you're running.

 It's really annoying when you're trying to debug a program, and the
 program you're running is not the one you're adding the debugging
 statements to.  However, I suspect most of us have done it on occasion.

 Ed
 How the #*! is it getting past all those debug statements without
 hitting any?!?! - Me






error_log [info] [debug] lines

2002-08-12 Thread Anton Permyakov

Hello, all.

My error_log is abounded with following lines.
What does it mean, and how it impacts on Apache performance in general?
Thank you.

[Sat Aug 10 12:50:03 2002] [info] [client 24.165.240.166] (104)Connection
reset by peer: client stopped connection before rwrite completed
[Sat Aug 10 12:50:03 2002] [debug] Apache.c(364): (104)Connection reset by
peer: mod_perl: rwrite returned -1 (fd=3, B_EOUT=8)
[Sat Aug 10 12:50:04 2002] [info] [client 24.165.240.166] (104)Connection
reset by peer: client stopped connection before rwrite completed
[Sat Aug 10 12:50:04 2002] [debug] Apache.c(364): (104)Connection reset by
peer: mod_perl: rwrite returned -1 (fd=3, B_EOUT=8)
[Sat Aug 10 12:50:05 2002] [info] [client 24.165.240.166] (104)Connection
reset by peer: client stopped connection before rwrite completed





Mixing TOMCAT and mod_perl sessions

2002-08-12 Thread Yair Lenga


Greetings,
The website I'm supporting is running both TOMCAT applications('.war'),
and has mod_perl scripts (all of them are registry - CGIscripts).
I have the following requirements:


The user identification information must be shared between TOMCAT and mod_perl
(so that the user does not need to login twice).


No data sharing between mod_perl and TOMCAT application - but each of them
need to store some persistent data.


Session should be persistent across server restarts (which excludes shared
memory based solutions).

I'm currently using 'home-grown' session management, where each session
is represented as a file. Both TOMCAT (4.0.4), and mod_perl (Apache::Session)
can serialize session state. Can anyone suggest a smart way to get the
two to work together - at minimum, I need to be able to create and destroy
sessions, and to have the user id shared between the two. Preferably, using
files (and not mysql).
Thanks,
Yair Lenga




Re: Mixing TOMCAT and mod_perl sessions

2002-08-12 Thread Gunther Birznieks

What you could do is write an Apache::Session driver that instead of 
storing to a file, passes the session id as a call to a web service that 
gets and sets session data using parameters sent to a servlet running in 
the same context as the sessions where your Java servlets/JSPs run.

I've not done it, but I think it would be awesome if sessions could be 
shared between Java Servlets and Perl. We have a lot of apps written in 
both technologies ourselves (banking in Java, portal stuff in Perl)

I don't think doing this would be too hard.

Later,
Gunther

At 08:36 PM 8/12/2002, Yair Lenga wrote:
Greetings,

The website I'm supporting is running both TOMCAT applications ('.war'), 
and has mod_perl scripts (all of them are registry - CGI scripts). I have 
the following requirements:
* The user identification information must be shared between TOMCAT 
 and mod_perl (so that the user does not need to login twice).
* No data sharing between mod_perl and TOMCAT application - but each 
 of them need to store some persistent data.
* Session should be persistent across server restarts (which excludes 
 shared memory based solutions).
I'm currently using 'home-grown' session management, where each session is 
represented as a file. Both TOMCAT (4.0.4), and mod_perl (Apache::Session) 
can serialize session state. Can anyone suggest a smart way to get the two 
to work together - at minimum, I need to be able to create and destroy 
sessions, and to have the user id shared between the two. Preferably, 
using files (and not mysql).

Thanks,
Yair Lenga


__
Gunther Birznieks ([EMAIL PROTECTED])
eXtropia - The Open Web Technology Company
http://www.eXtropia.com/
Office: (65) 64791172 Mobile: (65) 96218290




Mixing TOMCAT and mod_perl sessions (resend)

2002-08-12 Thread Yair Lenga

Greetings,

The website I'm supporting is running both TOMCAT applications ('.war'), and has 
mod_perl scripts (all of them are registry - CGI scripts). I have the following 
requirements:

   * The user identification information must be shared between TOMCAT and mod_perl 
(so that the user does not need to login twice).
   * No data sharing between mod_perl and TOMCAT application - but each of them need 
to store some persistent data.
   * Session should be persistent across server restarts (which excludes shared memory 
based solutions).

I'm currently using 'home-grown' session management, where each session is represented 
as a file. Both TOMCAT (4.0.4), and mod_perl (Apache::Session) can serialize session 
state. Can anyone suggest a smart way to get the two to work together - at minimum, I 
need to be able to create and destroy sessions, and to have the user id shared between 
the two. Preferably, using files (and not mysql).

Thanks,
Yair Lenga

PS: This is a resend of the original message - based on request from the moderator to 
avoid html formatting.






Re: Mixing TOMCAT and mod_perl sessions

2002-08-12 Thread Perrin Harkins

Yair Lenga wrote:
 The website I'm supporting is running both TOMCAT applications ('.war'), 
 and has mod_perl scripts (all of them are registry - CGI scripts). I 
 have the following requirements:
 
 * The user identification information must be shared between TOMCAT
   and mod_perl (so that the user does not need to login twice).
 * No data sharing between mod_perl and TOMCAT application - but each
   of them need to store some persistent data.
 * Session should be persistent across server restarts (which
   excludes shared memory based solutions).

You would probably have to implement the session interface on both 
sides.  It could be fairly easy to implement sessions if you make a few 
assumptions, like a session will be a single hash with no complex 
structures or objects in it.  A simple serialization scheme would then 
be possible for both languages (maybe use an existing XML one).  You can 
use a database for persistent storage from both sides.

- Perrin






Re: Handler Concept / Question

2002-08-12 Thread Thomas Whitney


 If I do set my script to answer all requests, how do I tell the
 webserver to show the static content that exists under the requested
 url?

You have to make the default handler pick it up.  I forget the exact
syntax, but there were some examples posted to the mailing list a while
back.
- Perrin

Hi,
I was following this thread with interest because I want to do something
like this.  I started searching on list archive for the above mentioned
syntax,  I searched for 'static content', then 'default handler', but with
no luck.  I do not mind doint the the searching, if you would perhaps
suggest a couple other search topics.

Thanks,

Thomas Whitney.




Re: Handler Concept / Question

2002-08-12 Thread Rick Myers

On Aug 12, 2002 at 11:50:56 -0600, Thomas Whitney wrote:
   I was following this thread with interest because I want to do something
 like this.  I started searching on list archive for the above mentioned
 syntax,  I searched for 'static content', then 'default handler', but with
 no luck.  I do not mind doint the the searching, if you would perhaps
 suggest a couple other search topics.

You were close. It's default-handler.

  http://httpd.apache.org/docs/handler.html

--rick




RE: can't fine ModuleConfig.c.

2002-08-12 Thread Goehring, Chuck Mr., RCI - San Diego

Randy,

I'm using Perl 5.6.0 for this. Should I be using 5.8.0?  Does that affect 
ModuleConfig.c?

Having problems running things with the version I put out last week.  It complains 
about the dumbest things and is overly strict.

Thanks
Chuck


-Original Message-
From: Randy Kobes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 06, 2002 12:34 PM
To: Goehring, Chuck Mr., RCI - San Diego
Cc: mod perl list (E-mail)
Subject: RE: can't fine ModuleConfig.c.


On Sun, 4 Aug 2002, Goehring, Chuck Mr., RCI - San Diego wrote:

 Randy,
 
 Got things working - had to get that thing into production
 before the security folks took us out of the dns.
 
 Failed modperl's test because the test required Process.pm
 which in turn required the entire libwin32 (which died during
 compile).  On the modperl side, I deleted ModuleConfig.c fom
 the project and it compiled.

Are you using a recent ActivePerl? The libwin32 suite
should be there, if you are ...

 
 Did:
perl Makefile.PL
nmake install
Built .so file using VC++ IDE.
nmake test (died because of Process.pm)
nmake install
 
 Did not modify any make or provide any options to Makefile.PL
 
 
 As dangerous as this seams, it did run and passed minimal
 testing.  Have had no reports of problems from the users.  It
 isn't doing e-commerce or the like.
 
 Something is up with ModuleConfig.c though.  I don't know what
 that file does.  We use mod_perl just to speed up cgis so maybe
 it isn't needed for my purposes.

I'll try to look into what's up with ModuleConfig.c ... 

best regards,
randy





please unsubscribe me

2002-08-12 Thread mikedennisdanese

please unsubscribe me

__
Pre-order the NEW Netscape 7.0 browser. Reserve your FREE CD and pay only $2.99 
shipping and handling. http://cd.netscape.com/promo_one/ 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/



Apache-server-dir_config-{DocumentRoot} is null on startup

2002-08-12 Thread srp

Hi,

On a Apache/1.3.23 (Unix) mod_perl/1.26, if I check 
 Apache-server-dir_config during server startup, I find it is empty !!

 Dumper shows it is bless( {}, 'Apache::Table' ).

 Shouldn't the conf file key/value pairs be available in this Apache::Table 
 during a server startup ?  Apache-server-dir_config(any key) is empty.

 Also ...

 How else can i find the server-document_root ?

 Please mail me directly as I am not on the list. and TIA :-)
 
 regards
 srp



Re: Handler Concept / Question

2002-08-12 Thread Stas Bekman

Rick Myers wrote:
 On Aug 12, 2002 at 11:50:56 -0600, Thomas Whitney wrote:
 
  I was following this thread with interest because I want to do something
like this.  I started searching on list archive for the above mentioned
syntax,  I searched for 'static content', then 'default handler', but with
no luck.  I do not mind doint the the searching, if you would perhaps
suggest a couple other search topics.
 
 
 You were close. It's default-handler.
 
   http://httpd.apache.org/docs/handler.html

And in mod_perl docs:
http://perl.apache.org/docs/1.0/guide/config.html#Overriding_E_lt_LocationE_gt__Setting_in__Sub_Location_



__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: please unsubscribe me

2002-08-12 Thread Stas Bekman

[EMAIL PROTECTED] wrote:
 please unsubscribe me

Only you can do that. Look at the email header, it says:

list-unsubscribe: mailto:[EMAIL PROTECTED]

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: error_log [info] [debug] lines

2002-08-12 Thread Stas Bekman

Anton Permyakov wrote:
 Hello, all.
 
 My error_log is abounded with following lines.
 What does it mean, and how it impacts on Apache performance in general?

You sometimes get these when clients abort their connections. There is 
not much you can do about that. It doesn't impact the performance.

 Thank you.
 
 [Sat Aug 10 12:50:03 2002] [info] [client 24.165.240.166] (104)Connection
 reset by peer: client stopped connection before rwrite completed
 [Sat Aug 10 12:50:03 2002] [debug] Apache.c(364): (104)Connection reset by
 peer: mod_perl: rwrite returned -1 (fd=3, B_EOUT=8)
 [Sat Aug 10 12:50:04 2002] [info] [client 24.165.240.166] (104)Connection
 reset by peer: client stopped connection before rwrite completed
 [Sat Aug 10 12:50:04 2002] [debug] Apache.c(364): (104)Connection reset by
 peer: mod_perl: rwrite returned -1 (fd=3, B_EOUT=8)
 [Sat Aug 10 12:50:05 2002] [info] [client 24.165.240.166] (104)Connection
 reset by peer: client stopped connection before rwrite completed



__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: Apache-server-dir_config-{DocumentRoot} is null on startup

2002-08-12 Thread Stas Bekman

  How else can i find the server-document_root ?

e.g: Apache-server_root_relative(htdocs);


__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: NTLM module

2002-08-12 Thread Gerald Richter


According to the documentation, if you set NTMLauthoritative to off,
then if NTLM authorization fails, then it should pass it on to the lower
level modules.

Yes, that's true and it works like you describe it. The point that you are
missing is (and that I have tried to show in my last mail), that during NTLM
authentication there is no password! NTLM never passes the password to the
server, so also the control gets passed to the lower level module, this
lower level module must be able to handle NTLM. The default Apache auth
handler isn't able to do so. It expects a password, which it doesn't gets
because the client never has send it.

Hope it's a little bit more clear now

Gerald

-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-



 I have cut out the below section from the doco which
relates to the above functionality :

=head2 PerlSetVar ntlmauthoritative

Setting the ntlmauthoritative directive explicitly to 'off' allows
authentication
to be passed on to lower level modules if AuthenNTLM cannot autheticate
the userand the NTLM authentication scheme is used.
If set to 'on', which is the default, AuthenNTLM will try to verify the
user andif it fails will give an Authorization Required reply.

=head2 PerlSetVar basicauthoritative

Setting the ntlmauthoritative directive explicitly to 'off' allows
authentication
to be passed on to lower level modules if AuthenNTLM cannot autheticate
the userand the Basic authentication scheme is used.
If set to 'on', which is the default, AuthenNTLM will try to verify the
user andif it fails will give an Authorization Required reply.




From the above description, I am hoping for the following events to take
place


-   ntlm authentication   (if fail this level go to next authentication)

-   basic authentication  (if fails this level go to other
authentication systems)

-   read passwords in htpasswd file  ( if this fails, then access not
granted)




To enable the following behaviour, I have included the following
directives in httpd.conf.

-  ntlmauthoritative off
-  basicauthoritative off


I have also taken out the basic authentication to see if this works ie

Authtype ntlm   (not basic)

But this still does fail  allow the htpasswd system to verify access.



If there are changes that need to be made to  the AuthenNTLM.pm, I am
not very well read in this area - are there any goof references.

From my novice perspective, it appears that when NTLM is included as
part of the authentication, the ability for normal modules to verify
access (ie htpasswd file) is no longer available ie the perl module does
not pass back what the standard modules are expecting.

I am sorry to be a bit unclear in my analysis, but I am fairly new to
apache  perl modules.


Many Thanks


Adam


original email attached









-Original Message-
From: Gerald Richter [mailto:[EMAIL PROTECTED]]
Sent: Monday, 12 August 2002 5:35 PM
To: Kaye-Smith Adam; [EMAIL PROTECTED]
Subject: Re: NTLM module



- Original Message -
From: Kaye-Smith Adam [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 12, 2002 4:51 AM
Subject: NTLM module


Hello ,


When I enter in an NT password it all works ok but when I use a
user/pass from the htpasswd file, the only way it will work is that I
change the above line to

AuthType Basic instead of
AuthType ntlm,Basic.


With this change I can access passwords in htpasswd  also authenticate
from an NT server but I can no longer use NTLM.

The problem is that Basic authentication requires a password from the
client
which can be compared against your password file. In case of NTLM auth,
there is no password ever send over the wire, so Apache doesn't have
anything which it can compare against it's passwd file.

The solution would be to derive a class from AuthenNTLM and do the
computation of the challage and response based on the secrets in the
passwd
file (you would need to store MD4 hashs of your passwords somewhere).
There
is a module called Perl::AuthenNTLM which may be helpfull in doing this
task.

Gerald


-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-







The information in this e-mail 

Re: NTLM module

2002-08-12 Thread Peter Bi

You may check Apache::Access module at http://modperl.home.att.net in which
I tried to provide a general solution to several popular authentication
issuers such as SMB, LDAP, IMAP, NIS, FTP, LWP and DBI etc.

Cheers.


Peter Bi

- Original Message -
From: Gerald Richter [EMAIL PROTECTED]
To: Kaye-Smith Adam [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, August 12, 2002 9:12 PM
Subject: Re: NTLM module



 According to the documentation, if you set NTMLauthoritative to off,
 then if NTLM authorization fails, then it should pass it on to the lower
 level modules.

 Yes, that's true and it works like you describe it. The point that you are
 missing is (and that I have tried to show in my last mail), that during
NTLM
 authentication there is no password! NTLM never passes the password to the
 server, so also the control gets passed to the lower level module, this
 lower level module must be able to handle NTLM. The default Apache auth
 handler isn't able to do so. It expects a password, which it doesn't gets
 because the client never has send it.

 Hope it's a little bit more clear now

 Gerald

 -
 Gerald Richterecos electronic communication services gmbh
 Internetconnect * Webserver/-design/-datenbanken * Consulting

 Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
 E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
 WWW:http://www.ecos.de  Fax:  +49 6133 925152
 -



  I have cut out the below section from the doco which
 relates to the above functionality :
 
 =head2 PerlSetVar ntlmauthoritative

 Setting the ntlmauthoritative directive explicitly to 'off' allows
 authentication
 to be passed on to lower level modules if AuthenNTLM cannot autheticate
 the userand the NTLM authentication scheme is used.
 If set to 'on', which is the default, AuthenNTLM will try to verify the
 user andif it fails will give an Authorization Required reply.

 =head2 PerlSetVar basicauthoritative

 Setting the ntlmauthoritative directive explicitly to 'off' allows
 authentication
 to be passed on to lower level modules if AuthenNTLM cannot autheticate
 the userand the Basic authentication scheme is used.
 If set to 'on', which is the default, AuthenNTLM will try to verify the
 user andif it fails will give an Authorization Required reply.
 



 From the above description, I am hoping for the following events to take
 place


 -   ntlm authentication   (if fail this level go to next authentication)

 -   basic authentication  (if fails this level go to other
 authentication systems)

 -   read passwords in htpasswd file  ( if this fails, then access not
 granted)




 To enable the following behaviour, I have included the following
 directives in httpd.conf.

 -  ntlmauthoritative off
 -  basicauthoritative off


 I have also taken out the basic authentication to see if this works ie

 Authtype ntlm   (not basic)

 But this still does fail  allow the htpasswd system to verify access.



 If there are changes that need to be made to  the AuthenNTLM.pm, I am
 not very well read in this area - are there any goof references.

 From my novice perspective, it appears that when NTLM is included as
 part of the authentication, the ability for normal modules to verify
 access (ie htpasswd file) is no longer available ie the perl module does
 not pass back what the standard modules are expecting.

 I am sorry to be a bit unclear in my analysis, but I am fairly new to
 apache  perl modules.


 Many Thanks


 Adam


 original email attached









 -Original Message-
 From: Gerald Richter [mailto:[EMAIL PROTECTED]]
 Sent: Monday, 12 August 2002 5:35 PM
 To: Kaye-Smith Adam; [EMAIL PROTECTED]
 Subject: Re: NTLM module



 - Original Message -
 From: Kaye-Smith Adam [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, August 12, 2002 4:51 AM
 Subject: NTLM module


 Hello ,


 When I enter in an NT password it all works ok but when I use a
 user/pass from the htpasswd file, the only way it will work is that I
 change the above line to
 
 AuthType Basic instead of
 AuthType ntlm,Basic.
 
 
 With this change I can access passwords in htpasswd  also authenticate
 from an NT server but I can no longer use NTLM.

 The problem is that Basic authentication requires a password from the
 client
 which can be compared against your password file. In case of NTLM auth,
 there is no password ever send over the wire, so Apache doesn't have
 anything which it can compare against it's passwd file.

 The solution would be to derive a class from AuthenNTLM and do the
 computation of the challage and response based on the secrets in the
 passwd
 file (you would need to store MD4 hashs of your passwords somewhere).
 There
 is a module called Perl::AuthenNTLM which may be helpfull in doing this
 task.

 Gerald


 

variables not changing with modperl??

2002-08-12 Thread Michael Drons

I am using Apache::Registry (Apache 1.3.26) I am see
weird things happen with my scripts.  I have have use
strict in all of the scripts and I use my() for all
of my variables.  But I still have variables that
contain data from previous loads.  I see it in hashes
and arrays.  Especially, if I have an array that
contains 6 strings in load 1 and only 2 strings in
load 2.  In the second load of the script the array
will contain the 2 new strings and the 4 old strings. 
Everything I can find in docs says read the FAQ at 
http://perl.apache.org/faq/, which does not exists.
This link comes from the subscribe message.  I have
thought about using PerlRun, but a module I use
(AuthCookie) requies mod_perl.  How do I undefine or
reinit the variable?  I am currently using undef, but
it does not work.

Mike Drons

__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com



Re: variables not changing with modperl??

2002-08-12 Thread Michael Drons

Thanks for the link.  I actually don't use functions. 
Everything is mostly in MAIN.  Here is a snip of code:

#!/usr/bin/perl -wT
use strict;
print body;
my $r = Apache-request;
$r-content_type(text/html);
$r-status(200);
my $auth_type = $r-auth_type;
$cookie=$auth_type-key;
($user,$hash)=split(/:/,$cookie);
read(STDIN, my $buffer, $ENV{'CONTENT_LENGTH'});
my @pairs = split(//, $buffer);
foreach my $pair (@pairs) {

}

What I am doing wrong?  Everytime the script runs the
values of the variables coming in change.  Should I
use the delete function and delete all of the
variables at the end of the script?  @pairs is what
should change, but sometimes does not.  I have tried
to add a undef @pairs before the split, but no luck.


Mike

--- Perrin Harkins [EMAIL PROTECTED] wrote:
 Michael Drons wrote:
  I am using Apache::Registry (Apache 1.3.26) I am
 see
  weird things happen with my scripts.  I have have
 use
  strict in all of the scripts and I use my() for
 all
  of my variables.  But I still have variables that
  contain data from previous loads.
 
 Sounds like the closure problem with subroutines in
 Apache::Registry. 
 Does you code have subroutines that refer to
 variables declared outside 
 of them?
 
  Everything I can find in docs says read the FAQ at
 
  http://perl.apache.org/faq/, which does not
 exists.
 
 Read this:

http://perl.apache.org/docs/general/perl_reference/perl_reference.html#my___Scoped_Variable_in_Nested_Subroutines
 
 - Perrin
 


__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com



cvs commit: modperl Changes

2002-08-12 Thread stas

stas2002/08/12 00:11:39

  Modified:lib/Apache PerlRun.pm
   .Changes
  Log:
  eliminate warnings when flushing functions with empty () prototypes in
  Apache::PerlRun::flush_namespace
  Submitted by: Yair Lenga [EMAIL PROTECTED]
  Reviewed by:  stas
  
  Revision  ChangesPath
  1.40  +1 -1  modperl/lib/Apache/PerlRun.pm
  
  Index: PerlRun.pm
  ===
  RCS file: /home/cvs/modperl/lib/Apache/PerlRun.pm,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- PerlRun.pm29 May 2002 16:52:17 -  1.39
  +++ PerlRun.pm12 Aug 2002 07:11:39 -  1.40
  @@ -354,7 +354,7 @@
   if (defined $fullname) {
   no warnings;
   local $^W = 0;
  -if (my $p = prototype $fullname) {
  +if (defined(my $p = prototype $fullname)) {
   *{$fullname} = eval sub ($p) {};
   }
   else {
  
  
  
  1.655 +3 -0  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.654
  retrieving revision 1.655
  diff -u -r1.654 -r1.655
  --- Changes   31 Jul 2002 02:10:16 -  1.654
  +++ Changes   12 Aug 2002 07:11:39 -  1.655
  @@ -10,6 +10,9 @@
   
   =item 1.27_01-dev
   
  +eliminate warnings when flushing functions with empty () prototypes in
  +Apache::PerlRun::flush_namespace [Yair Lenga [EMAIL PROTECTED]]
  +
   fix Apache::Status to not use :: in filenames, which is not allowed on
   certain OSs [DH [EMAIL PROTECTED]]