Pages: [1]
Author Topic: !!HELP!! activation not working!  (Read 1292 times)
amitk
Guest


Email
on: Feb 24, 08, 05:26 AM

hi there,
i have a BIG problem with activation:

when i click the link from the email, i get to the
Quote
Something went wrong with your account's activation. Please make sure you entered the correct activation URL
page... not good.

i looked into the .php, and the problem seems to be in the first stage of the script, looks like no user can be found in the DB.

this is where the script reaches the error:
Code:
$bOK = !empty($_REQUEST['email']) && !empty($_REQUEST['code']);
if( $bOK )
{
$res = $db->super_query( "SELECT * FROM ".$cMain['dbPrefix']."users WHERE email='" .
$_REQUEST['email']."' AND activation_code=".$_REQUEST['code']." LIMIT 1", false );
$bOK = !empty( $res );
}
if( $bOK ) //<--- here's the problem!

what's the problem? how can i fix this??
thank you,
Amit
Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 481


Email
Reply #1 on: Feb 26, 08, 11:52 AM

Amit, though we've fixed this problem on your site, I think the solution can be interested to other users... so, here it is:

Actualy the problem is inside .htaccess. Most of you will never even notice it, but on some server configurations it can exist, so here are its descrption and solution.
Description: the parameters QSA and L are in incorrect order in the end of this line:
Code:
RewriteRule ^user/([_a-zA-Z0-9]+)/?$ userhome.php?page=$1 [L,QSA]
L means "stop processing, QSA - move all parameters to the new url.
Solution: just swap those 2 params, the correct code is:
Code:
RewriteRule ^user/([_a-zA-Z0-9]+)/?$ userhome.php?page=$1 [QSA,L]

Though I have not found anything confirming that the order of those params matters, looks like it does.
Logged
Pages: [1]
 
Jump to: