[pmwiki-users] Authentication Error

The Editor editor at fast.st
Sun Sep 24 08:10:05 CDT 2006


Here's the appropriate lines in authuser.php.  I put a star by line 82
* in my editor.  Maybe someone can suggest what exactly this is
looking for and why it's not being found on the FAST Data login
script?  My login script is still down at the bottom.

  foreach(preg_grep('/^@/', (array)@$auth[$authid]) as $g)
    $authlist[$g] = 1;
  foreach(preg_grep('/^@/', (array)@$auth['*']) as $g)
    $authlist[$g] = 1;
*  foreach(preg_grep('/^@/', array_keys($auth)) as $g)
    if (in_array($authid, $auth[$g])) $authlist[$g] = 1;
  if ($auth['htgroup']) {
    foreach(AuthUserHtGroup($pagename, $id, $pw, $auth['htgroup']) as $g)
      $authlist["@$g"] = 1;
  }
  SessionAuth($pagename, array('authid' => $authid, 'authlist' => $authlist));
}



On 9/24/06, Crisses <crisses at kinhost.org> wrote:
>
> On Sep 24, 2006, at 2:51 AM, The Editor wrote:
>
> > I got the following warnings trying to login to my demo site using
> > FAST Data. It doesn't seem to do it on my production site, but maybe I
> > don't see them.  Any thoughts?
> >
> > I attached below a copy of the login script.  On my home machine it
> > logs in perfectly (though it doesn't grant password permissions, just
> > identity based ones.  Which is fine... But would like to fix it still.
> >  But first things first.
> >
> > These error messages. Any clue what they mean?
> >
> > Cheers,
> > Caveman
> >
> >
> > Warning: array_keys() [function.array-keys]: The first argument should
> > be an array in /home/fastst/public_html/fastwiki/system/scripts/
> > authuser.php
> > on line 82
> >
> > Warning: preg_grep() [function.preg-grep]: Second argument to
> > preg_grep() should be an array in
> > /home/fastst/public_html/fastwiki/system/scripts/authuser.php on line
> > 82
> >
> > Warning: Invalid argument supplied for foreach() in
> > /home/fastst/public_html/fastwiki/system/scripts/authuser.php on line
> > 82
> >
> > Warning: Cannot modify header information - headers already sent by
> > (output started at
> > /home/fastst/public_html/fastwiki/system/scripts/authuser.php:82) in
> > /home/fastst/public_html/fastwiki/system/pmwiki.php on line 870
> >
> > Warning: Cannot modify header information - headers already sent by
> > (output started at

> > /home/fastst/public_html/fastwiki/system/scripts/authuser.php:82) in
> > /home/fastst/public_html/fastwiki/system/pmwiki.php on line 871
> >
> >
> >               if ($field == "login") {
> >                       $dp = $DataKey."Profiles.$_POST[member]";
> >                       if (($value == "auto") and (! PageExists($dp))) {
> >                               AuthUserId($pagename, $_POST['member']);
> >                               $m .= "You have been successfully logged in.  ";
> >                               }
> >                       $pass1 = GetData($dp,"Password");
> >                       $pass2 = $_POST['passwd'];
> >                       if ($pass1 == $pass2) {
> >                               AuthUserId($pagename, $_POST['member']);
> >                               $m .= "You have been successfully logged in.  ";
> >                               }
> >                       else Warning("Incorrect member name or password.");
> >                       }
>
> First, I'd be checking out what authuser.php line 82 is using.  It's
> expecting an array in that line and you haven't given one.
>
> I can't tell if you've closed your braces correctly in the code
> snippet you presented.  I've never seen an else statement without an
> opening brace and closing brace.  That would totally break the config
> file, so that's probably not the problem.
>
> The last two warnings are caused by the first 3 warnings.  You can
> safely ignore them.  So concentrate on authuser.php line 82.  My
> authuser.php doesn't HAVE array-keys??
>
> Crisses
>




More information about the pmwiki-users mailing list