Jump to content

Recommended Posts

Posted

I am running phpbb on my TCH website (onlinemilford.com), and I have noticed an unusual thing -- I must consistently log in twice. The first time simply doesn't "take" -- phpbb ignores the attempt. No error message, no nothing -- it just plain doesn't work. Has anybody had a similar problem? Anybody know how to fix it?

 

Thank you in advance.

 

Eric

Posted

Hmm, just from your description of the problem I would guess you have something wrong with your cookies either on your machine or how the board generates them. That might be the place you should start troubleshooting. :)

Posted

Eric,

 

Try this:

 

Cookie Domain : .domainname.com

Cookie Path : /exactpath/

 

e.g. If totalchoice web hosting was running a phpBB forum then:

 

Cookie Domain : .totalchoicehosting.com

Cookie Path : /forums/

 

Jim

Posted

Replace in /includes/functions.php the entire code section from "function redirect($url)" to the final "}" with the code below.

 

 

>function redirect($url) 
{ 
  global $db, $board_config; 
   
          if (!empty($db)) 
          { 
                  $db->sql_close(); 
          } 

  $server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://'; 
  $server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name'])); 
  $server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : ''; 
  $script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path'])); 
  $script_name = ($script_name == '') ? $script_name : '/' . $script_name; 
  //$url = preg_replace('#^\/?(.*?)\/?$#', '/\1', trim($url)); 

  // Redirect via an HTML form for PITA webservers 
  if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE'))) 
  { 
     header('Refresh: 0; URL=' . $server_protocol . $server_name . $server_port . $script_name . $url); 
     echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="refresh" content="0; url=' . $server_protocol . $server_name . $server_port . $script_name . $url . '"><title>Redirect</title></head><body><div align="center">If your browser does not support meta redirection please click <a href="' . $server_protocol . $server_name . $server_port . $script_name . $url . '">HERE</a> to be redirected</div></body></html>'; 
     exit; 
  } 

  // Behave as per HTTP/1.1 spec for others 
  //header('Location: ' . $server_protocol . $server_name . $server_port . $script_name . $url); 
  header('Location: ' . $url); 
  exit; 
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...