Seite 1 von 1

Error nach Update

Verfasst: 23.04.2006 23:39
von adidas
Hallo,

nach Update habe ich error im profile.php:
Parse error: syntax error, unexpected $end in /home/xxxx/public_html/profile.php on line 155
hier mein profile.php

Code: Alles auswählen

<?php
//-- mod : categories hierarchy ------------------------------------------------
//-- mod : cash mod ------------------------------------------------
/***************************************************************************
 *                                profile.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: profile.php,v 1.193.2.6 2006/02/26 17:34:50 grahamje Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
//-- mod : cash mod ------------------------------------------------
//-- add
if ( (isset($HTTP_GET_VARS['mode']) && ($HTTP_GET_VARS['mode'] == 'viewprofile')) || (isset($HTTP_POST_VARS['mode']) && ($HTTP_POST_VARS['mode'] == 'viewprofile')) )
{
   define('IN_CASHMOD', true);
   define('CM_VIEWPROFILE',true);
}
//-- fin mod : cash mod --------------------------------------------
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_PROFILE);
init_userprefs($userdata);
//
// End session management
//

//-- mod : categories hierarchy ------------------------------------------------
//-- add
$navigation = new navigation();
$navigation->add('Profile', '', 'profile', array('mode' => _read('mode', TYPE_NO_HTML), POST_USERS_URL => _read(POST_USERS_URL, TYPE_INT)), '');
$navigation->display();

// pic buttons
_button('submit');
$template->assign_vars(array(
   'I_SUBMIT' => $user->img('cmd_submit'),
   'S_SUBMIT' => $user->lang('cmd_submit'),
));
//-- fin mod : categories hierarchy --------------------------------------------

// session id check
if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid']))
{
   $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid'];
}
else
{
   $sid = '';
}

//
// Set default email variables
//
$script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
$script_name = ( $script_name != '' ) ? $script_name . '/profile.'.$phpEx : 'profile.'.$phpEx;
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';

$server_url = $server_protocol . $server_name . $server_port . $script_name;

// -----------------------
// Page specific functions
//
function gen_rand_string($hash)
{
   $rand_str = dss_rand();

//-- mod : categories hierarchy ------------------------------------------------
//-- delete
/*
   return ( $hash ) ? md5($rand_str) : substr($rand_str, 8);
*/
//-- add
   // fix a typo
   return ( $hash ) ? md5($rand_str) : substr($rand_str, 0, 8);
//-- fin mod : categories hierarchy --------------------------------------------
//
// End page specific functions
// ---------------------------

//
// Start of program proper
//
if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
   $mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
   $mode = htmlspecialchars($mode);

   if ( $mode == 'viewprofile' )
   {
      include($phpbb_root_path . 'includes/usercp_viewprofile.'.$phpEx);
      exit;
   }
   else if ( $mode == 'editprofile' || $mode == 'register' )
   {
      if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
      {
         redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
      }

      include($phpbb_root_path . 'includes/usercp_register.'.$phpEx);
      exit;
   }
   else if ( $mode == 'confirm' )
   {
      // Visual Confirmation
      if ( $userdata['session_logged_in'] )
      {
         exit;
      }

      include($phpbb_root_path . 'includes/usercp_confirm.'.$phpEx);
      exit;
   }
   else if ( $mode == 'sendpassword' )
   {
      include($phpbb_root_path . 'includes/usercp_sendpasswd.'.$phpEx);
      exit;
   }
   else if ( $mode == 'activate' )
   {
      include($phpbb_root_path . 'includes/usercp_activate.'.$phpEx);
      exit;
   }
   else if ( $mode == 'email' )
   {
      include($phpbb_root_path . 'includes/usercp_email.'.$phpEx);
      exit;
   }
}

redirect(append_sid("index.$phpEx", true));

?>
aber da gibts kein line 155, das letzte ?> ist linie 151

Verfasst: 24.04.2006 00:42
von Mahony
Hallo
Eventuell sind noch Leerzeichen hinter
Grüße: Mahony

Verfasst: 24.04.2006 02:02
von adidas
Mahony hat geschrieben:Hallo
Eventuell sind noch Leerzeichen hinter
Grüße: Mahony
Hi,

da sind keine Leerzeichen.

Hat jemand noch andere Ideen??

Verfasst: 24.04.2006 02:51
von Mahony
Hallo
Wie ich bei nochmaligem lesen deine Postings sehe, hast du den Categories Hierarchy MOD installiert. Die Codechanges dafür sind etwas abweichend. Lade dir mal bitte die passenden Codechanges herunter---->http://ptifo.clanmckeen.com/download.php?pack=2 und arbeite diese ab.


Grüße: Mahony