Seite 1 von 2
Fehlermeldung -- wer kann helfen?
Verfasst: 08.11.2002 09:28
von Ragnar
Hallo
ich habe ein Problem wenn sich in meinem Board ein neuer User anmelden will erscheint nachfolgende Meldung, übrigens die Anmeldung und Freischaltung funktioniert aber trotzdem steht dieser Kram da.
Parse error: parse error in /var/www/html/phpbb/includes/usercp_avatar.php on line 170
Warning: Cannot add header information - headers already sent by (output started at /var/www/html/phpbb/includes/usercp_avatar.php:170) in /var/www/html/phpbb/includes/page_header.php on line 449
Warning: Cannot add header information - headers already sent by (output started at /var/www/html/phpbb/includes/usercp_avatar.php:170) in /var/www/html/phpbb/includes/page_header.php on line 450
Warning: Cannot add header information - headers already sent by (output started at /var/www/html/phpbb/includes/usercp_avatar.php:170) in /var/www/html/phpbb/includes/page_header.php on line 451
Gruss
Verfasst: 08.11.2002 09:47
von Acid
..poste ma die Zeilen 150 - 180 der usercp_avatar.php.
hoffe das war richtig
Verfasst: 08.11.2002 10:47
von Ragnar
if ( !$error && $avatar_filesize > 0 && $avatar_filesize < $board_config['avatar_filesize'] )
{
$avatar_data = substr($avatar_data, strlen($avatar_data) - $avatar_filesize, $avatar_filesize);
$tmp_path = ( !@$ini_val('safe_mode') ) ? '/tmp' : './' . $board_config['avatar_path'] . '/tmp';
$tmp_filename = tempnam($tmp_path, uniqid($user_ip) . '-');
$fptr = @fopen($tmp_filename, 'wb');
$bytes_written = @fwrite($fptr, $avatar_data, $avatar_filesize);
@fclose($fptr);
if ( $bytes_written != $avatar_filesize )
{
@unlink($tmp_filename);
message_die(GENERAL_ERROR, 'Could not write avatar file to local storage. Please contact the board administrator with this message', '', __LINE__, __FILE__);
}
list($width, $height) = @getimagesize($tmp_filename);
}
else
{
$l_avatar_size = sprintf($lang['Avatar_filesize'], round($board_config['avatar_filesize'] / 1024));
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $l_avatar_size : $l_avatar_size;
}
}
else if ( file_exists(@realpath($avatar_filename)) ) && preg_match('/\.(jpg|jpeg|gif|png)$/i', $avatar_realname) )
{
if ( $avatar_filesize <= $board_config['avatar_filesize'] && $avatar_filesize > 0 )
{
preg_match('#image\/[x\-]*([a-z]+)#', $avatar_filetype, $avatar_filetype);
$avatar_filetype = $avatar_filetype[1];
}
else
{
$l_avatar_size = sprintf($lang['Avatar_filesize'], round($board_config['avatar_filesize'] / 1024));
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $l_avatar_size : $l_avatar_size;
return;
}
list($width, $height) = @getimagesize($avatar_filename);
}
if ( !($imgtype = check_image_type($avatar_filetype, $error, $error_msg)) )
{
return;
}
if ( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
{
$new_filename = uniqid($user_ip) . $imgtype;
if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' )
{
if ( file_exists(@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, &$popuppm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat)
{
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;
}
}
}
}
}
Verfasst: 08.11.2002 11:11
von Acid
..welche Boardversion is´n das und was hast´n verändert (bzw. versucht zu verändern) ?
Verfasst: 08.11.2002 11:14
von Ragnar
Powered by phpBB 2.0.3 © 2001, 2002 phpBB Group
Das ist die Version
Ansonsten habe ich eigentlich nichts versucht zu verändern!
Gruss
Verfasst: 08.11.2002 13:12
von Acid
..der Code sieht a bissel anders aus, als in meiner 2.0.3er usercp_avatar.php.
Speichere ma die Datei als whatever.txt ab und poste einen Link.
Hier die Datei
Verfasst: 08.11.2002 13:29
von Ragnar
http://mafru.pointclark.net/fibeln/test.txt
Hallo
hier der Link zur Datei
Gruss und danke
Verfasst: 08.11.2002 15:03
von Ragnar
Mit dem 2ten Thread war ein Unfall sorry
Verfasst: 08.11.2002 23:09
von Ragnar
Hallo kann mir denn niemand helfen brauche dringend support.
Gruss
Verfasst: 09.11.2002 10:36
von Mister_X

Klär mich mal auf wie du an diese Version gekommen bist ? Wo hast du dein phpBB2 runtergeladen ? Ohne die Info kann ich die leider nicht helfen, da ich diese Datei (usercp_avatar.php) nur eine Version tiefer finde
Desweiteren finden sich ganz unten nach ?> zwei Leerzeilen die du weglöschen solltest