Re: Authen::NTLM

2004-07-08 Thread Shannon Eric Peevey
Phipps, Jeff wrote:
Hello,
I am having a problem with the Authen:NTLM module 2.07.  I am not sure if
these are bugs, or I am trying to implement it incorrectly.
Problem 1:   If it is using a pre-existing user connection, it does not
recall the map_user function
I am using the map_user function to setup environment variables that I query
from the ADS using LDAP, so the application does not have to handle quering
such information as email address, etc...
 

This is because NTLM HTTP authentication is connection-oriented, rather 
than request-oriented.  Therefore, each subsequent request will not 
carry any authentication information that would prompt for an 
authentication request from the server.  (This is true except when 
submitting a POST request).

http://davenport.sourceforge.net/ntlm.html#ntlmHttpAuthentication
Problem 2:  Can't login from a remote Windows PC
The module seems to only try NTLM if the client is a windows machine, and if
you are not part of the domain, it will not authorize you.  Should this try
using Basic if NTLM fails to allow non member machines to authenticate
against the domain like a netscape browser would do?
 

Yes, NTLM will really only work with Internet Explorer.  (Though there 
are rumors of other browsers(???) that might have NTLM support 
implemented now...)  I would test with basic.  If that works, make sure 
that you are setting the Keep-Alive header, (HTTP 1.0), or using HTTP 
1.1, for the transaction.  Also, check to see if you have a proxy 
between the client and the server.  This will stop any NTLM 
authentication attempts, as well.  (Check out this thread: 
http://www.gossamer-threads.com/lists/modperl/modperl/69976 )

take care,
--
Shannon Eric Peevey
President - EriKin Corporation
[EMAIL PROTECTED]
(940) 391-6777
http://www.erikin.com

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Perl to DB2 works outside Apache, not in Apache

2004-07-08 Thread Waldo_Tumanut/MO/americancentury

I have a Perl program that I can get to work when I execute in command window but fails when invoked from browser.  The Apache log shows

install_driver(DB2) failed: Can't load 'D:/Perl/v5.6.1/site/lib/auto/DBD/DB2/DB2.dll' for module DBD::DB2: load_file:The specified module could not be found at D:/Perl/v5.6.1/lib/DynaLoader.pm line 206.\n
Compilation failed in require at (eval 1) line 3.\n
Perhaps a required shared library or dll isn't installed where expected\n

I've searched google but I thought it's time to ask for help... am obviously a newbie.
  
Waldo Tumanut
Database Analyst



CONFIDENTIALITY NOTICE:  This electronic transmission (including any
accompanying attachments) is intended solely for its authorized
recipient(s), and may contain confidential and/or legally privileged
information.  If you are not an intended recipient, or responsible for
delivering some or all of this transmission to an intended recipient, be
aware that any review, copying, printing, distribution, use or disclosure of
the contents of this message is strictly prohibited.  If you have received
this electronic message in error, please contact us immediately by
electronic mail at [EMAIL PROTECTED] or notify us
immediately by telephone at 1-800-345-2021 or 816-531-5575 and destroy the
original and all copies of this transmission (including any attachments).
Thank you.





Re: Perl to DB2 works outside Apache, not in Apache

2004-07-08 Thread Frank Wiles
On Thu, 8 Jul 2004 10:21:10 -0500
Waldo_Tumanut/MO/[EMAIL PROTECTED] wrote:

> I have a Perl program that I can get to work when I execute in command
> 
> window but fails when invoked from browser.  The Apache log shows
> 
> install_driver(DB2) failed: Can't load 
> 'D:/Perl/v5.6.1/site/lib/auto/DBD/DB2/DB2.dll' for module DBD::DB2: 
> load_file:The specified module could not be found at 
> D:/Perl/v5.6.1/lib/DynaLoader.pm line 206.\n
> Compilation failed in require at (eval 1) line 3.\n
> Perhaps a required shared library or dll isn't installed where
> expected\n
> 
> I've searched google but I thought it's time to ask for help... am 
> obviously a newbie.

  This is actually a Perl question and not really mod_perl related.  But
  the quick answer is the library DBD::DB2 is not installed on your
  system.  You will need to install it from cpan.org. 

 -
   Frank Wiles <[EMAIL PROTECTED]>
   http://frank.wiles.org
 -


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Cached vars

2004-07-08 Thread Vadim
Are there any way to dump all cached vars for scripts under mod_perl?


-- 
Vad

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Cached vars

2004-07-08 Thread Ruslan U. Zakirov
Vadim пwrote:
Are there any way to dump all cached vars for scripts under mod_perl?

perldoc Apache::Status ?
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Cached vars

2004-07-08 Thread Perrin Harkins
On Thu, 2004-07-08 at 12:09, Vadim wrote:
> Are there any way to dump all cached vars for scripts under mod_perl?

Can you explain what you mean by "cached vars"?  Are you talking about
global variables?

- Perrin


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Perl to DB2 works outside Apache, not in Apache

2004-07-08 Thread Randy Kobes
On Thu, 8 Jul 2004, Frank Wiles wrote:

> On Thu, 8 Jul 2004 10:21:10 -0500
> Waldo_Tumanut/MO/[EMAIL PROTECTED] wrote:
>
> > I have a Perl program that I can get to work when I execute in command
> >
> > window but fails when invoked from browser.  The Apache log shows
> >
> > install_driver(DB2) failed: Can't load
> > 'D:/Perl/v5.6.1/site/lib/auto/DBD/DB2/DB2.dll' for module DBD::DB2:
> > load_file:The specified module could not be found at
> > D:/Perl/v5.6.1/lib/DynaLoader.pm line 206.\n
> > Compilation failed in require at (eval 1) line 3.\n
> > Perhaps a required shared library or dll isn't installed where
> > expected\n
> >
> > I've searched google but I thought it's time to ask for help... am
> > obviously a newbie.
>
>   This is actually a Perl question and not really mod_perl related.  But
>   the quick answer is the library DBD::DB2 is not installed on your
>   system.  You will need to install it from cpan.org.

Sometimes such a problem arises even if the Perl module
DBD::DB2 is installed, but the path to an external library
(dll on Win32) needed by the database progam itself isn't
found in the mod_perl environent. Try adding the directory
containing any dll needed by DB2 to your PATH environment
variable within the mod_perl application.

-- 
best regards,
randy kobes

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Cached vars

2004-07-08 Thread Vadim
I found a lot of useful information in 
"perldoc Apache::Status" (thanks Ruslan)

But i still have a problem.
When i run this script under ModPerl::Registry for several times, i get the 
warrning in the my error.log
[Thu Jul 08 21:55:04 2004] [warn] /perl/test.pl did not send an HTTP header

Why so it? Please, direct me to respective manual.

So, test.pl
-
#!/usr/bin/perl -w
package Headers;
use strict;
sub new {

my $this  = shift;
my $class = ref($this) || $this;
my $self  = {};
bless $self, $class;
$self->{headers} = {
"Expires"   => "Mon, 26 Jul 1997 05:00:00 GMT",
"Last-Modified" => gmtime(time) . " GMT",
"Cache-Control" => "no-cache",
"Cache-Control" => "post-check=0, pre-check=0",
"Pragma"=> "no-cache",
"Character-Set" => "windows-1251",
"Content-Type"  => "text/html; charset=windows-1251",
};
return $self;
}
sub print  {
my $self = shift;
print $_, ": ", $self->{headers}->{$_}, "\n" for keys 
%{ $self->{headers} };
print "\n";
}



package main;
use strict;
use warnings;


our $HEADERS = new Headers;
$HEADERS->print();
print 1;

-



> On Thu, 2004-07-08 at 12:09, Vadim wrote:
> > Are there any way to dump all cached vars for scripts under mod_perl?
>
> Can you explain what you mean by "cached vars"?  Are you talking about
> global variables?
>
> - Perrin

-- 
Vad

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Apache-Test module skeletons

2004-07-08 Thread Geoffrey Young

> Nice work, Geoff. May be they should live on CPAN, so one doesn't need
> to remember where to grab them from? e.g. create an empty
> Apache::Test::Skeleton::mod_perl(1|2) packages with versioning in those
> tars and upload to CPAN?

that's an idea, but kind of a long name :)  maybe just
Apache::Test::Skeleton::MP1 or something.

but yeah, I'll come up with a package and upload them to cpan soonish.

--Geoff

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



One and Two

2004-07-08 Thread David Arnold
All,

Is it possible to install both versions of ModPerl (one and Two) on the
same  machine, accompanying versions of Apache?

I'd like to experiment with both on Linux.

I have the most recent version of apache running in /usr/local/apache2. Can
I install the older version in /usr/local/apache?

And will modperl1 work with perl 5.8.4?

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: One and Two

2004-07-08 Thread Geoffrey Young


David Arnold wrote:
> All,
> 
> Is it possible to install both versions of ModPerl (one and Two) on the
> same  machine, accompanying versions of Apache?

yes.  if you install mod_perl 1.0 first mod_perl 2.0 will install it's perl
module relative to Apache2/.  then just 'PerlModule Apache2' in your
httpd.conf and you're good to go.

> 
> I'd like to experiment with both on Linux.

I run mp against apache 1.3.X, 2.0, and 2.1 on the same box with no problems.

> 
> I have the most recent version of apache running in /usr/local/apache2. Can
> I install the older version in /usr/local/apache?

yup.

> 
> And will modperl1 work with perl 5.8.4?
> 

absoultely.

HTH

--Geoff

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: One and Two

2004-07-08 Thread Stas Bekman
David Arnold wrote:
All,
Is it possible to install both versions of ModPerl (one and Two) on the
same  machine, accompanying versions of Apache?
I'd like to experiment with both on Linux.
I have the most recent version of apache running in /usr/local/apache2. Can
I install the older version in /usr/local/apache?
And will modperl1 work with perl 5.8.4?
Yes and yes, and yes
install mp2 using MP_INST_APACHE2=1
http://perl.apache.org/docs/2.0/user/install/install.html#MP_INST_APACHE2

--
__
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
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: mod_perl presence at OSCON (and other CONs) is at danger

2004-07-08 Thread Stas Bekman
Stas Bekman wrote:
[...]
So if you enjoy your mod_perl job and want to continue so in the future, 
make sure that you come to the mod_perl tutorials and presentations at 
OSCon and other big conferences.

Here is the OSCon info.
http://conferences.oreillynet.com/os2004/
p.s. the deadline for tutorial cutoffs (at least 20 attendees) is June 
21th. So if you were planning to go to the tutorials, make sure you 
register (or add the tutorials if you already did) before that date.
As Geoff has just mentioned to me, both mod_perl tutorials at the 
upcoming OSCon2004 are not only not cancelled, but are now SOLD OUT [1][2].

Thanks to everybody who has signed up. Hopefully this will be a good 
reason to accept more mod_perl talks/tutorials next year.

[1] http://conferences.oreillynet.com/cs/os2004/view/e_sess/5082
[2] http://conferences.oreillynet.com/cs/os2004/view/e_sess/5042
--
__
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
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


[mp2] $r->read() return negative value.

2004-07-08 Thread wood chen
I'm using CGI.pm 3.05 with mod_per 1.99 and Apache 2.0.40 on a  Red
Hat Linux 9 box. When uploading a large file to my perl script,
If I abort file transfer by close the browser, the httpd child
 process who process this request will run out of memory.
 Whe i trace into the CGI.pm, I found in mod_perl2 the $r->read will
 return -1 instead of 0 when user stop a POST submit.

is't a mod_perl bug?

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html