FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Problem with registering new users
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Problem with registering new users [message #26606 is a reply to message #26588] Thu, 28 July 2005 21:02 Go to previous messageGo to previous message
Zaxon Spox is currently offline  Zaxon Spox   Poland
Messages: 9
Registered: July 2005
Karma:
Junior Member
Zaxon Spox wrote on Thu, 28 July 2005 06:10

Warning: Cannot add header information - headers already sent by (output started at c:\apache\htdocs\forum\theme\default\register.php:1635) in c:\apache\htdocs\forum\theme\default\register.php on line 1408




It is said that cannot add header information:

at line 1635:
function send_email($from, $to, $subj, $body, $header='')
{
	if( empty($to) || !count($to) ) return;	
	
	if( $GLOBALS['USE_SMTP'] == 'Y' ) {
		$smtp = new fud_smtp;
		$smtp->msg = $body;
		$smtp->subject = $subj;
		$smtp->to = $to;
		$smtp->from = $from;
		$smtp->headers = $header;
		$smtp->send_smtp_email();
	}
	else {
		$bcc='';
	
		if( is_array($to) ) {
			if( ($a = count($to)) > 1 ) {
				$bcc = "Bcc: ";
				for( $i=1; $i<$a; $i++ ) $bcc .= $to[$i].', ';
				$bcc = substr($bcc,0,-2);	
			}		
			$to = $to[0];
		}
		if( $header ) 
			$header = "\n".str_replace("\r", "", $header);
		else if( $bcc ) 
			$bcc = "\n".$bcc;
				
THIS LINE		mail($to, $subj, str_replace("\r", "", $body), "From: $from\nErrors-To: $from\nReturn-Path: $from\nX-Mailer: FUDforum v".$GLOBALS['FORUM_VERSION'].$header.$bcc);
	}		
}

& at 1408 line:
function check_return()
{
        if ( empty($GLOBALS['returnto']) ) 
        	$GLOBALS['returnto']='http://localhost/forum/index.php?'._rsidl;
        else {
        	$url_bits = parse_url($GLOBALS['returnto']);
        	$GLOBALS['returnto']='http://localhost/forum/index.php?'._rsidl;
		
		if( $url_bits['query'] ) {
			parse_str(str_replace('&', '&', $url_bits['query']), $url_args);
			if( is_array($url_args) ) {
				foreach( $url_args as $k => $v ) {
					if( $k == 'S' || $k == 'rid' ) continue;
					$GLOBALS['returnto'] .= '&'.$k.'='.urlencode($v);
				}	
			}
		}
        }
THIS LINE        header("Location: ".$GLOBALS['returnto']);
	exit();
}class fud_smtp
{


What to do? Is there any solution? Mayby I just del somthing like barbarians do...
Sad

[Updated on: Thu, 28 July 2005 21:03]

Report message to a moderator

[Message index]
 
Read Message icon9.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: plz help a lonely admin
Next Topic: Mlist_msg_id getting cleared when a message is edited
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 09 02:19:35 GMT 2024

Total time taken to generate the page: 0.04742 seconds