[問題]會員註冊出現奇怪訊息~「問題已排除」

phpBB Installation & Usage Support
phpBB 2 安裝於各類型作業平台之問題討論;外掛問題,請到相關版面依發問格式發表!
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

版面規則
本區是討論關於 phpBB 2.0.X 架設安裝上的問題,只要有安裝任何外掛,請到外掛討論相關版面按照公告格式發表。
(發表文章請按照公告格式發表,違者砍文)
主題已鎖定
krc
星球公民
星球公民
文章: 58
註冊時間: 2004-08-18 01:56
來自: 你心靈深處
聯繫:

[問題]會員註冊出現奇怪訊息~「問題已排除」

文章 krc »

目前測試新會員註冊時發現一個怪現像
就是註冊送出後論壇上方畫面上會出現一個錯誤訊息\r
可是系統在此時仍有受理註冊,且新註冊會員仍然會收到mail並順利啟動帳號
不知是那方面出現了問題,雖還能正常註冊,可是老出現這訊息總是覺的怪怪的

另外之前有增加姓別外掛,而在會員資料的姓別欄位
也會出現不應該出現的&&符號
請教各位大大,到底是那一帳程式碼出現問題呢??
因為我找不出來~~看來看去都覺的一樣 :roll:
訊息如下:

代碼: 選擇全部

Parse error: parse error, unexpected T_STRING, expecting ')' in e:\appserv\www\phpbb\includes\usercp_avatar.php on line 321

因為不知道要怎麼找第321行,只好把下半段都貼出來了 :cry:

代碼: 選擇全部

<?php
	if ( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
	{
		$new_filename = uniqid(rand()) . $imgtype;

		if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' )
		{
			if ( file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $current_avatar)) )
			{
				@unlink('./' . $board_config['avatar_path'] . '/' . $current_avatar);
			}
		}

		if( $avatar_mode == 'remote' )
		{
			@copy($tmp_filename, './' . $board_config['avatar_path'] . "/$new_filename");
			@unlink($tmp_filename);
		}
		else
		{
			if ( @$ini_val('open_basedir') != '' )
			{
				if ( @phpversion() < '4.0.3' )
				{
					message_die(GENERAL_ERROR, 'open_basedir is set and your PHP version does not allow move_uploaded_file', '', __LINE__, __FILE__);
				}

				$move_file = 'move_uploaded_file';
			}
			else
			{
				$move_file = 'copy';
			}

			$move_file($avatar_filename, './' . $board_config['avatar_path'] . "/$new_filename");
		}

		@chmod('./' . $board_config['avatar_path'] . "/$new_filename", 0777);

		$avatar_sql = ( $mode == 'editprofile' ) ? ", user_avatar = '$new_filename', user_avatar_type = " . USER_AVATAR_UPLOAD : "'$new_filename', " . USER_AVATAR_UPLOAD;
	}
	else
	{
		$l_avatar_size = sprintf($lang['Avatar_imagesize'], $board_config['avatar_max_width'], $board_config['avatar_max_height']);

		$error = true;
		$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $l_avatar_size : $l_avatar_size;
	}

	return $avatar_sql;
}

function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, &$new_password, &$cur_password, &$password_confirm, &$icq, &$aim, &$msn, &$yim, &$website, &$location, &$occupation, &$interests, &$signature, &$viewemail, &$notifypm, &$popup_pm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat, &$session_id, &$gender)
{
	global $board_config, $db, $template, $lang, $images, $theme;
	global $phpbb_root_path, $phpEx;

	$dir = @opendir($board_config['avatar_gallery_path']);

	$avatar_images = array();
	while( $file = @readdir($dir) )
	{
		if( $file != '.' && $file != '..' && !is_file($board_config['avatar_gallery_path'] . '/' . $file) && !is_link($board_config['avatar_gallery_path'] . '/' . $file) )
		{
			$sub_dir = @opendir($board_config['avatar_gallery_path'] . '/' . $file);

			$avatar_row_count = 0;
			$avatar_col_count = 0;
			while( $sub_file = @readdir($sub_dir) )
			{
				if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $sub_file) )
				{
					$avatar_images[$file][$avatar_row_count][$avatar_col_count] = $file . '/' . $sub_file; 
					$avatar_name[$file][$avatar_row_count][$avatar_col_count] = ucfirst(str_replace("_", " ", preg_replace('/^(.*)\..*$/', '\1', $sub_file)));

					$avatar_col_count++;
					if( $avatar_col_count == 5 )
					{
						$avatar_row_count++;
						$avatar_col_count = 0;
					}
				}
			}
		}
	}

	@closedir($dir);

	@ksort($avatar_images);
	@reset($avatar_images);

	if( empty($category) )
	{
		list($category, ) = each($avatar_images);
	}
	@reset($avatar_images);

	$s_categories = '<select name="avatarcategory">';
	while( list($key) = each($avatar_images) )
	{
		$selected = ( $key == $category ) ? ' selected="selected"' : '';
		if( count($avatar_images[$key]) )
		{
			$s_categories .= '<option value="' . $key . '"' . $selected . '>' . ucfirst($key) . '</option>';
		}
	}
	$s_categories .= '</select>';

	$s_colspan = 0;
	for($i = 0; $i < count($avatar_images[$category]); $i++)
	{
		$template->assign_block_vars("avatar_row", array());

		$s_colspan = max($s_colspan, count($avatar_images[$category][$i]));

		for($j = 0; $j < count($avatar_images[$category][$i]); $j++)
		{
			$template->assign_block_vars('avatar_row.avatar_column', array(
				"AVATAR_IMAGE" => $board_config['avatar_gallery_path'] . '/' . $avatar_images[$category][$i][$j], 
				"AVATAR_NAME" => $avatar_name[$category][$i][$j])
			);

			$template->assign_block_vars('avatar_row.avatar_option_column', array(
				"S_OPTIONS_AVATAR" => $avatar_images[$category][$i][$j])
			);
		}
	}

	$params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popup_pm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat, 'gender'');

	$s_hidden_vars = '<input type="hidden" name="sid" value="' . $session_id . '" /><input type="hidden" name="agreed" value="true" />';

	for($i = 0; $i < count($params); $i++)
	{
		$s_hidden_vars .= '<input type="hidden" name="' . $params[$i] . '" value="' . str_replace('"', '"', $$params[$i]) . '" />';
	}
	
	$template->assign_vars(array(
		'L_AVATAR_GALLERY' => $lang['Avatar_gallery'], 
		'L_SELECT_AVATAR' => $lang['Select_avatar'], 
		'L_RETURN_PROFILE' => $lang['Return_profile'], 
		'L_CATEGORY' => $lang['Select_category'], 

		'S_CATEGORY_SELECT' => $s_categories, 
		'S_COLSPAN' => $s_colspan, 
		'S_PROFILE_ACTION' => append_sid("profile.$phpEx?mode=$mode"), 
		'S_HIDDEN_FIELDS' => $s_hidden_vars)
	);

	return;
}
?>
請各位大大求命
最後由 krc 於 2004-08-18 13:15 編輯,總共編輯了 1 次。
~~目前架站環境~~
資料庫版本:appserv2.30 版
PHPBB版本:2.0.10中文正體版
作業系統:win xp 架立於E槽之下
網路環境:中華ADSL 2M/512K
右手
星球公民
星球公民
文章: 78
註冊時間: 2004-05-10 21:21

文章 右手 »

代碼: 選擇全部

'dateformat, 'gender'');
應該是這裡錯了
改成

代碼: 選擇全部

'dateformat', 'gender');
性別欄旁邊的&&
開templates/subsilver/profile_add_body.tpl
找\r

代碼: 選擇全部

<tr> 
      <td class="row1"><span class="gen">{L_GENDER}:</span></td> 
      <td class="row2"> 
      <input type="radio" {LOCK_GENDER} name="gender" value="0" {GENDER_NO_SPECIFY_CHECKED}/> 
      <span class="gen">{L_GENDER_NOT_SPECIFY}</span>&& 
      <input type="radio" name="gender" value="1" {GENDER_MALE_CHECKED}/> 
      <span class="gen">{L_GENDER_MALE}</span>&& 
      <input type="radio" name="gender" value="2" {GENDER_FEMALE_CHECKED}/> 
      <span class="gen">{L_GENDER_FEMALE}</span></td> 
</tr>
改成

代碼: 選擇全部

<tr> 
      <td class="row1"><span class="gen">{L_GENDER}:</span></td> 
      <td class="row2"> 
      <input type="radio" {LOCK_GENDER} name="gender" value="0" {GENDER_NO_SPECIFY_CHECKED}/> 
      <span class="gen">{L_GENDER_NOT_SPECIFY}</span>
      <input type="radio" name="gender" value="1" {GENDER_MALE_CHECKED}/> 
      <span class="gen">{L_GENDER_MALE}</span> 
      <input type="radio" name="gender" value="2" {GENDER_FEMALE_CHECKED}/> 
      <span class="gen">{L_GENDER_FEMALE}</span></td> 
</tr>
●架設主機作業系統:Windows 2000 Pro
●我的上網方式:ADSL HINET2MB/512K浮動IP
●我安裝的程式:Apache HTTP Server 2.0.55 +PHP 4.4/5.0.5 + MySql4.0.26
●我的 phpBB2 版本:phpBB 2.0.17
●我的 phpBB2 連結網址
krc
星球公民
星球公民
文章: 58
註冊時間: 2004-08-18 01:56
來自: 你心靈深處
聯繫:

文章 krc »

謝謝右手大大的指正\r
現問題均已解決~~^^~~謝謝您喔~~~ :lol:
~~目前架站環境~~
資料庫版本:appserv2.30 版
PHPBB版本:2.0.10中文正體版
作業系統:win xp 架立於E槽之下
網路環境:中華ADSL 2M/512K
主題已鎖定

回到「phpBB 2 安裝與使用」