Perl Apache Recipe: Session Cookies in MySQL

Believe it or not. I could not google successfully for a minimal and coherent Perl solution for storing session information in a MySQL database. One that is actually working and has survived the Apache2/mod_perl2 version chasm.

Which obviously rules out MasonX::Request::WithApacheSession. That would be the minimal canonical way as it can be fully configured from the httpd.conf file. But to make this work, I would have to manage a local patch, something I'd like to avoid.

Posted In

Cookie Monsters in the Closet

Warning from the General Perl Surgeon:

Googling for Perl Apache handlers can be harmful to your mental health. Really.

Yesterday I came across the following code fragment within an Apache handler:

my $id = undef;
foreach (keys %cookies)
   if(($_) eq 'T2G')
      $id = $cookies{$_}->value;

Aren't the brackets formatted so nicely?

Posted In

Tarpitting with Apache and mod_security2

Like any other superhero, I like to fight the evil in this world. At least on Sundays.

Posted In

reverse-proxying ntop: Tragedy in 4 Acts

Table of Contents


If you install - like I had to do recently - a lot of open source software, you sometimes wonder what the developers had thought about architecture. No, not about the architecture of their own products; I have stopped wondering about this. It's about how individual pieces are supposed to fit into an existing or evolving landscape, i.e. how they coexist or even interact with other software.

Yes, dear open source developer, so I think sometimes, the universe is bigger

Posted In