[pmwiki-users] Devilish php problem...

The Editor editor at fast.st
Sat Aug 12 22:02:05 CDT 2006


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...

I tried settype, but it doesn't help (gettype says both are strings).
There are no extra white spaces in the html before or after either. It
should work!!! And this is holding up a bunch of stuff I really would
like to do.  (Our membership is growing rapidly--and the sooner I get
this set up the fewer registration I will have to convert over by
hand).  Any ideas why this conditional might possibly be failing?

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;

Cheers,
Caveman




More information about the pmwiki-users mailing list