Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Mod_perl Handler

by iavian (Initiate)
on Jul 15, 2008 at 16:14 UTC ( #697750=perlquestion: print w/replies, xml ) Need Help??

iavian has asked for the wisdom of the Perl Monks concerning the following question:

I have a mod_perl apache handler that either returns OK or redirects to login page.

redirection works fine
but when it returns OK , it doesn't continue parsing the actual requested file

Request -> http://localhost/index.php
Handler checks for username cookie
redirect if no cookie is available
Continue serving index.php if cookie is already available - I'm unable to achieve this

Please let me know if I'm missing anything

Replies are listed 'Best First'.
Re: Mod_perl Handler
by clinton (Priest) on Jul 15, 2008 at 16:24 UTC

    It depends how you've set up your handlers, but it sounds to me like your handler which checks the cookie should be returning DECLINED, not OK. OK means that the request is finished. DECLINED signals to apache that it should pass the request on to the next handler.

    See the mod_perl docs for more

      Yes , but it doest pass to next handler

      I have python cgi scripts along with mod_perl handler

      after mod_perl handler the control is not passed to mod_cgi

      any help?

        You haven't provided any details about how you've configured Apache, but I'm guessing that you're trying to use both mod_cgi and mod_perl for the PerlResponseHandler, and I don't think that will work.

        If you're using the mod_perl handler to check the cookie, why not put it into a separate phase, such as PerlAccessHandler. See the HTTP Handler docs for details.

Re: Mod_perl Handler
by olus (Curate) on Jul 15, 2008 at 17:54 UTC

    And then there are others that rely on the termination of the names of the scripts called to gather statistics about language use :)

    Now to your topic. You'll need to show us your code so that we can see what the problem is. Maybe some conditionals misuse?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://697750]
Approved by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2023-02-05 01:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (31 votes). Check out past polls.

    Notices?