[pmwiki-users] Devilish php problem...

Patrick R. Michaud pmichaud at pobox.com
Sun Aug 13 08:49:58 CDT 2006


On Sat, Aug 12, 2006 at 11:02:05PM -0400, The Editor wrote:
> Just another quick request for help with a devilishly perplexing
> problem.  In the part of the recipe listed below, my debugging line
> (when uncommented) returns exactly identical values for pass1 & pass2.
>  But the conditional just below fails everytime. I've tried a zillion
> possible permutations, functions, 's, "s, etc...

Out of curiosity, how do you know that the conditional is failing?
Is it because the redirection isn't occurring, or ...?

> case "login" :
> 	clearstatcache();
>  	if ($dr = fopen("$WorkDir/Data-Account.$_POST[Member]", "rb")){
> 	$pc = fread($dr, filesize("$WorkDir/Data-Account.$_POST[Member]"));
> 	fclose($dr);
> 	$dc = explode("(:comment data:) %0a%0a", $pc);
> 	$db = explode(" %0a%0a", $dc[1]);
> 	$dv = explode ("=", $db[1]);
> 	$pass1 = stripslashes($dv[1]);
> 	$pass2 = $_POST[Password];
> //	Redirect(FmtPageName("$pagename?myname=$pass1.$pass2", $pagename));
> 	if ("$pass1" == "$pass2") {
> 	     AuthUserId($pagename, $_POST[Member]);
> 	     Redirect(FmtPageName("Members.Members", $pagename));
> 	     }
> 	}
> 	break;

Pm




More information about the pmwiki-users mailing list