#48 Localise PerlAccessHandler

Kevin Tam

PerlAccessHandler Slash::Apache::User

performs modifications on the Apache->request object
that appears to render it unusable for mod_perl
scripts outside Slash that use mod_perl and CGI.
Specifically, CGI.pm will not handle POST requests if
the request passses through that handler.

My workaround for this was to make sure the handler is
only used for Slash's scripts and the change is as
simple as

<Location ~ "^/(([^/]*)\.pl)?$">
PerlAccessHandler Slash::Apache::User
PerlLogHandler Slash::Apache::Log

I also move the LogHandler in the config so that Slash
doesn't log requests to my other scripts (but it will
miss logs to Slash's .html .shtml etc. files).
However, crucially, my other mod_perl app runs with
Slash quite happily now that the PerlAccessHandler
isn't in the way.

Here is the diff for bin/install-slashsite if it helps

--- install-slashsite Wed May 9 19:02:34 2001
+++ install-slashsite-patch Tue May 29 22:14:39
@@ -377,7 +377,9 @@

SlashVirtualUser $opts{'u'}

+ <Location ~ "^/(([^/]*)\.pl)?$">
PerlAccessHandler Slash::Apache::User
+ </Location>
PerlLogHandler Slash::Apache::Log

# this directive will redirect non-logged-in
users to


  • Kevin Tam

    Kevin Tam - 2001-05-29

    Logged In: YES

    Cliff tells me that Location regexp was a little
    confusing... which it is =P

    The point is that
    all get that handler which is necessary whereas
    doesn't get the PerlAccessHandler so it works properly

    The regexp might also need to be adjusted in the event that
    Slash is installed in a sub URL (mysite.com/slash/)

  • Nobody/Anonymous

    Logged In: NO

    Another way to do it:

    # turn off the special slash mod_perl handlers in the
    foo area
    <Location /foo>
    PerlAccessHandler "sub {1}"
    PerlLogHandler "sub {1}"

    I think that Alvaro's patch (http://sourceforge.net/tracker/
    atid=304421) also potentially fixes the problem.

    -nathan at thethirdsector dot com

  • Jamie McCarthy

    Jamie McCarthy - 2002-06-20
    • assigned_to: nobody --> krow
  • Brian Aker

    Brian Aker - 2002-08-01
    • assigned_to: krow --> cmdrtaco
    • status: open --> open-rejected
  • Brian Aker

    Brian Aker - 2002-08-01

    Logged In: YES

    The log handler and the rest are also used for non-slash
    pages (like shtml).
    So this is a no go.

  • Rob Malda

    Rob Malda - 2002-08-01
    • status: open-rejected --> closed-rejected

Log in to post a comment.