Re: [mp2] Win32 Apache2.2.9 + AP5.10.0 + MP2.04 = OK

2008-12-02 Thread Philip M. Gollucci

Foo JH wrote:

A point to note: Apache2::Reload is not available as part of the ppd
installs. However I was able to simply copy out the relevant folders in
the source to Perl/site/lib/, and it works w/o further intervention.
Yeah, we goofed the 2.0.4 release and mistakenly omitted it, its fixed 
or will be for 2.0.5.


Thanks for the feedback.


--

Philip M. Gollucci ([EMAIL PROTECTED]) c: 703.336.9354
Consultant - P6M7G8 Inc.  http://p6m7g8.net
Senior System Admin - RideCharge, Inc.  http://ridecharge.com
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70  3F8C 75B8 8FFB DB9B 8C1C

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.


[mp2] Win32 Apache2.2.9 + AP5.10.0 + MP2.04 = OK

2008-12-02 Thread Foo JH
Hi all,

Recently started testing the a/m stack. Happy to report: so far so good:
1. Apache can be restarted via ApacheMonitor.exe
2. Works with libapeq2.6.3
3. Survives multiple restarts
4. Works with Apache2::Reload

Disclaimer: I'm not hard-core mp2, so the tests are wy surface-grade .

A point to note: Apache2::Reload is not available as part of the ppd
installs. However I was able to simply copy out the relevant folders in
the source to Perl/site/lib/, and it works w/o further intervention.







Protecting a mod perl 1.3 site from slow MySql processes

2008-12-02 Thread April Papajohn
Hello,

I am working on a site that has a modperl (mod_perl 1.3, perl 5.8.0, on linux)
handler doing some authentication work via DBD::MySql. It connects to
a MySQL server over the network.

Recently during some maintenance on the MySql server, the entire site
was hung up, because the MySQL server was up, but it wasn't
responding. It is important that the site continue to function, even
if MySql is down or slow.

I was able to reproduce something like what may have happened simply
by pausing the MySql thread in my test environment. If I do that, the
web page does just hang.

The perl module wasn't dying, so wrapping everything in eval{} won't
solve the problem.

I tried setting alarm() around the DBI lines, using the Sys::SigAction
module, in order to get the script to timeout if MySql isn't
responsive. This works great if I run it as a plain perl script. But
it seems that alarm()  doesn't work when it runs as a perl module.

So now I'm stuck.

I'm just looking for suggestions for possible solutions. Any way that
I can safe guard the site against a misbehaving MySql server.

Thanks,
April


Re: Protecting a mod perl 1.3 site from slow MySql processes

2008-12-02 Thread Perrin Harkins
On Tue, Dec 2, 2008 at 1:56 PM, April Papajohn
[EMAIL PROTECTED] wrote:
 I tried setting alarm() around the DBI lines, using the Sys::SigAction
 module, in order to get the script to timeout if MySql isn't
 responsive. This works great if I run it as a plain perl script. But
 it seems that alarm()  doesn't work when it runs as a perl module.

You may be running different versions of perl or DBI in your script.
Signals are tricky when using some DBD drivers.  I suggest looking at
DBIx::Timeout for some information on this.

Realistically, it's not practical to wrap every single DBI call that
might hang if the server went away in the middle.  However, you can
adjust how long MySQL will wait to connect or timeout a dead
connection, and you can use something like Apache::DBI or
DBI-connect_cached which will ping your connection at the beginning
of a request.

- Perrin


Apache2-AuthenNTLM-0.02 - multiple domains issue

2008-12-02 Thread maniac
Hi Speeves,

i'm trying to get this package working as I need to do authentication for
apache users towards two separate NT domains.

For one domain it works OK, but not for multiple (two) domains.
What I found is that only defaultdomain PDC is being contacted neverthless
on what domain user specified in dialog box of her browser.

I'm using this configuration:

Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.8a DAV/2 PHP/4.4.4 
mod_perl/2.0.4 Perl/v5.8.8

Apache2-AuthenNTLM-0.02

and config files looks like this:

bash-3.1# cat ~maniac/public_html/auth/.htaccess
PerlAuthenHandler Apache2::AuthenNTLM
PerlAddVar ntdomain  ABCD  abcd00 abcd01
PerlAddVar ntdomain  EFGHIJKL  efgh00 efgh01
PerlSetVar defaultdomain ABCD
PerlSetVar fallbackdomain EFGHIJKL
PerlSetVar splitdomainprefix 1
PerlSetVar ntlmdebug 10
PerlSetVar ntlmauthoritative off
bash-3.1# 

bash-3.1# egrep '^KeepAlive' /usr/local/apache2/conf/httpd.conf
KeepAlive On
KeepAliveTimeout 15
bash-3.1# 


and here is DEBUG:

[433] AuthenNTLM: Config Domain = abcd  pdc = abcd00  bdc = abcd01
[433] AuthenNTLM: Config Domain = efghijkl  pdc = efgh00  bdc = efgh01
[433] AuthenNTLM: Config Default Domain = ABCD
[433] AuthenNTLM: Config Fallback Domain = EFGHIJKL
[433] AuthenNTLM: Config AuthType = ntlm,basic AuthName = Request Tracker
[433] AuthenNTLM: Config Auth NTLM = 1 Auth Basic = 1
[433] AuthenNTLM: Config NTLMAuthoritative = off  BasicAuthoritative = on
[433] AuthenNTLM: Config Semaphore key = 23754 timeout = 2
[433] AuthenNTLM: Config SplitDomainPrefix = 1
[433] AuthenNTLM: Authorization Header not given
[433] AuthenNTLM: Start NTLM Authen handler pid = 433, connection = 148859384 
conn_http_hdr = keep-alive  main =  cuser =  remote_ip = 10.43.0.1 remote_port 
= 13368 remote_host =  version = 0.02 smbhandle = 
[433] AuthenNTLM: Object exists user = \
[433] AuthenNTLM: Authorization Header NTLM 
TlRMTVNTUAABB4IIAAA=
[433] AuthenNTLM: Got: 78 84 76 77 83 83 80 0 1 0 0 0 7 130 8 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0
[433] AuthenNTLM: protocol=NTLMSSP, type=1, 
flags1=7(NEGOTIATE_UNICODE,NEGOTIATE_OEM,REQUEST_TARGET), 
flags2=130(NEGOTIATE_ALWAYS_SIGN,NEGOTIATE_NTLM), domain length=0, domain 
offset=0, host length=0, host offset=0, host=, domain=
[433] handler type == 1 
[433] AuthenNTLM: Connect to pdc = abcd00 bdc = abcd01 domain = ABCD
[433] AuthenNTLM: enter lock
[433] AuthenNTLM: verify handle  smbhandle == 148929880 
[433] AuthenNTLM: Send: 78 84 76 77 83 83 80 0 2 0 0 0 0 0 0 0 40 0 0 0 1 130 0 
0 42 225 65 221 113 136 230 1 0 0 0 0 0 0 0 0
[433] AuthenNTLM: charencoding = 1
[433] AuthenNTLM: flags2 = 130
[433] AuthenNTLM: nonce=*?A?q?
[433] AuthenNTLM: Send header: NTLM 
TlRMTVNTUAACACgBggAAKuFB3XGI5gEAAA==
[433] AuthenNTLM: verify handle = 1 smbhandle == 148929880 
[433] AuthenNTLM: Start NTLM Authen handler pid = 433, connection = 148859384 
conn_http_hdr = keep-alive  main =  cuser =  remote_ip = 10.43.0.1 remote_port 
= 13368 remote_host =  version = 0.02 smbhandle = 
[433] AuthenNTLM: Object exists user = \
[433] AuthenNTLM: Authorization Header NTLM 
TlRMTVNTUAADGAAYAGoYABgAggAAABAAEABADgAOAFAMAAwAXgAAAYIAAEEATABMAEUARwBSAE8AMgB6AHMAdgBpAGQAZQBvAGEAbgBhAGwAbwBnAKN089J3fFjZbtDbfMq+zMdz4/CG8Una1aN089J3fFjZbtDbfMq+zMdz4/CG8Una1Q==
[433] AuthenNTLM: Got: 78 84 76 77 83 83 80 0 3 0 0 0 24 0 24 0 106 0 0 0 24 0 
24 0 130 0 0 0 16 0 16 0 64 0 0 0 14 0 14 0 80 0 0 0 12 0 12 0 94 0 0 0 0 0 0 0 
0 0 0 0 1 130 0 0 65 0 76 0 76 0 69 0 71 0 82 0 79 0 50 0 122 0 115 0 118 0 105 
0 100 0 101 0 111 0 97 0 110 0 97 0 108 0 111 0 103 0 163 116 243 210 119 124 
88 217 110 208 219 124 202 190 204 199 115 227 240 134 241 73 218 213 163 116 
243 210 119 124 88 217 110 208 219 124 202 190 204 199 115 227 240 134 241 73 
218 213
[433] AuthenNTLM: protocol=NTLMSSP, type=3, user=xyz, host=analog, 
domain=EFGHIJKL, msg_len=0
[433] handler type == 3 
[433] AuthenNTLM: verify handle = 3 smbhandle == 148929880 
[433] AuthenNTLM: Verify user xyz via smb server
[433] AuthenNTLM: leave lock
[433] AuthenNTLM: rc = 3  ntlmhash = ?t??w|X?n??|ʾ??s???I??


As you can see, i'm using my firefox, entering login name EFGHIJKL\xyz, but 
module is trying to connect to servers of domain ABCD instead of EFGHIJKL.

I'm confused also why there is no domain\user specified in line [433] 
AuthenNTLM: Object exists user = \ , and later, there is line with correct 
user and domain: [433] AuthenNTLM: protocol=NTLMSSP, type=3, user=xyz, 
host=analog, domain=EFGHIJKL, msg_len=0

Many thanks,

maniac