in reply to cgi unknown function - match_group

Just saying that you have a 'problem' with some code without explicitly stating what the problem is does not give us much to go on.

match_group() is a method in HTTPD::RealmManager that returns a true/false letting you know if a given user is in a given group. Pretty simple, huh? Does this if condition ever evaluate as true? If so, have you verified your call to db_administration? If the if statement never evaluates to true but you expect that it should, have you verified what's in $ADMIN_GROUP and $user? If so, are you positive that the given user is in the given group?

I also noticed that above code is taken verbatim from this program. Are you using this program? Have you modified it? Did you modify it correctly? If you did modify it, you might wish to modify it to use strict. It might just catch your error for you. (and shame on Lincoln Stein for publishing such a large program that doesn't use strict)

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

  • Comment on (Ovid) Re: cgi unknown function - match_group

Replies are listed 'Best First'.
Re: (Ovid) Re: cgi unknown function - match_group
by Anonymous Monk on Nov 02, 2001 at 23:24 UTC
    Ovid, yes, I am using that program (except version 1.58)

    I modified the top customization section (everything worked ok with flat files), then put in a few debug statements after it did not work.

    if ($ADMIN_GROUP){ print "\n<p> ADMIN GROUP defined:$ADMIN_GROUP:\n<p>"; }
    This returns

    ADMIN GROUP defined:administrators:

    I put in "use strict;", but it crashed, I am wading through the errors like

    Global symbol "$CONFIG_FILE" requires explicit package name at ./user_ +manage line 38.

    I am positive I have put a user "bob" in group "administrators" in the database table, but the "do_administration" is never executed when I log in as bob.

    What I do not know is how to put in a debug to tell what group the program thinks user bob is in.

    I really don't think the problem is the code, but probably my setup, I just can not pinpoint why the "do_administration" subroutine is not being called for people in group "administrators".

    Thanks, Daniel

      Does anyone know of a location I can go to find out what methods are available in a particular module (HTTPD::RealmManager ) in particular???

      I am looking for a method that will tell me what group value the user_manage program thinks the database has for a particular username.

      Thanks,

      Daniel