I have two servers running in the light/heavy configuration as outlined in the guide. Both servers are 1.3.34. On the lightweight server, my proxy section looks like this:
---- RewriteEngine on RewriteRule ^/images - [L] RewriteRule .(css|ico)$ - [L] RewriteRule .swf$ - [L] RewriteRule ^.(.*) http://192.168.0.4:8080/$1 [P] ----On the heavy server, I'm running ePerl with a PerlHeaderParserHandler that is essentially just a wrapper for Apache::Session::MySQL
----
PerlHeaderParserHandler BoyGenius::AccessManagement::SessionTestTwo
<FilesMatch "\.phtml$">
SetHandler perl-script
PerlHandler Apache::ePerl
</FilesMatch>
-----
I have a big complicated handler that does all kinds of fancy crap, but in
the interest of nailing down the problem I've replaced it with one that was
pretty much cut and pasted from the Apache::Session perldoc:
----
package BoyGenius::AccessManagement::SessionTestTwo;
use Apache::Session::MySQL;
use Apache;
use strict;
sub handler {
my $r = shift;
#read in the cookie if this is an old session
my $cookie = $r->header_in('Cookie');
$cookie =~ s/SESSION_ID=(\w*)/$1/;
#create a session object based on the cookie we got from the browser,
#or a new session if we got no cookie
my %session;
tie %session, 'Apache::Session::MySQL', $cookie, {
DataSource => 'dbi:mysql:boygenius', #these arguments are
UserName => 'nobody', #required when using
Password => 'XXXXXXXXX', #MySQL.pm
LockDataSource => 'dbi:mysql:boygenius',
LockUserName => 'nobody',
LockPassword => 'XXXXXXXXX'
};
$r->pnotes('SESSION_ID', $session{_session_id});
#Might be a new session, so lets give them their cookie back
my $session_cookie = "SESSION_ID=$session{_session_id};";
$r->header_out("Set-Cookie" => $session_cookie);
}
1;
----
The problem I'm having is with this line:
$r->pnotes('SESSION_ID', $session{_session_id});
When this line is in there, I see the following behavior:
- When I fire up a new browser and access http://192.168.0.4/, the browser
hangs. In my bigger fancier handler with more detailed logging, it seems
to hang right before the session tie.
- When I fire up a new browser and access http://192.168.0.4/index.phtml, the page comes up as it should.
- When I fire up a new browser and access http://192.168.0.4:8080/, the page comes up as it should.
- When I fire up a new browser and access either http://192.168.0.4/index.phtml or http://192.168.0.4:8080/, and then access http://192.169.0.4/, the page comes up fine.
- When I fire up a new browser and access http://192.168.0.4/ and then access either http://192.168.0.4/index.phtml or http://192.168.0.4:8080/, none of the pages will come up.
I've replicated this on two different setups, and it acts the same everywhere. index.phtml has nothing but straight html in it, if that matters.I'm not even going to attempt to guess what's going on here, but I could really use a smack with the clue brick.
thanks!
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.