[pmwiki-users] Authentication Error

Crisses crisses at kinhost.org
Sun Sep 24 05:13:20 CDT 2006


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