Author Topic: account activation wrong url  (Read 5281 times)

0 Members and 1 Guest are viewing this topic.

Offline viper357

  • Newbie
  • *
  • Posts: 23
    • View Profile
account activation wrong url
« on: February 08, 2006, 07:51:16 PM »
Hello

I have been searching for over an hour and can't find an answer to my problem, please help   :?:

the account activation email contains this link...

http://www.reefclips.net:\/register.php?action=activate&activationkey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

when i click on this link, it doesn't work and I have to remove the :\ manually in the address bar in order for the link to work.

how do I fix this, thank you

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: account activation wrong url
« Reply #1 on: February 08, 2006, 09:06:28 PM »
Quote

&activationkey=3adab3509340815527351d6c54d08e80


 8O 8O 8O

Never post random numbers such as SESSIONID and action keys.

Please replace your link with this one :

Quote

http://www.reefclips.net:\/register.php?action=activate&activationkey=xxxxxx


before it's too late !!

Offline viper357

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: account activation wrong url
« Reply #2 on: February 08, 2006, 09:18:04 PM »
thanks oracle  :oops:

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: account activation wrong url
« Reply #3 on: February 08, 2006, 09:32:56 PM »
In your register.php file,

find :

Quote

if ($result) {
      $activation_url = $script_url."/register.php?action=activate&activationkey=".$activationkey;

      include(ROOT_PATH.'includes/email.php');
      $site_email = new Email();
      $site_email->set_to($user_email);
      $site_email->set_subject($lang['register_success_emailsubject']);
      $site_email->register_vars(array(
        "activation_url" => $activation_url,


replace the bolded line :

Quote

"activation_url" => $activation_url,


with this one :

Code: [Select]

"activation_url" => (stripslashes(trim($activation_url))),


Then, retry the registration process again as you should not see the additional backslash again. ;)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: account activation wrong url
« Reply #4 on: February 09, 2006, 12:38:32 AM »
Check your includes/constants.php if you set manualy the SCRIPT_URL make sure it has correct formating and no trailing slash at the end.

But I think something wrong in global.php...make sure you have this block of code:
Code: [Select]
if (defined("SCRIPT_URL") && SCRIPT_URL != "") {
  $script_url = SCRIPT_URL;
}
else {
  $port = (!preg_match("/^(80|443)$/", getenv("SERVER_PORT"), $port_match)) ? ":".getenv("SERVER_PORT") : "";
  $script_url  = ($port_match[1] == 443) ? "https://" : "http://";
  $script_url .= (!empty($HTTP_SERVER_VARS['HTTP_HOST'])) ? $HTTP_SERVER_VARS['HTTP_HOST'] : getenv("SERVER_NAME");
  $script_url .= $port;
  $script_url .= (dirname($PHP_SELF) != "/") ? dirname($PHP_SELF) : "";
}
If you do and its not altered, then try to add below that block this line:
Code: [Select]
echo $script_url;It should show you the site url on top of each page (dont worry about possible other error messages).

If it shows the correct url then the problem is somewhere between global.php and the code TheOracle showed...check if $script_url variable being altered somewhere...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)