GrandX Опубликовано 11 Июля 2003 Жалоба Поделиться Опубликовано 11 Июля 2003 Parse error: parse error, unexpected $ in /home/c/clanspirits.9.com1.ru/WWW/forum/sources/functions.php on line 2582 Fatal error: Cannot instantiate non-existent class: session in /home/c/clanspirits.9.com1.ru/WWW/forum/index.php on line 113 Можете посмотреть так http://www.clanspirits.ru/forum/index.php Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 theIggs Опубликовано 11 Июля 2003 Жалоба Поделиться Опубликовано 11 Июля 2003 Строчки functions.php с 2572 по 2592 и index.php с 103 по 123?.. Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 GrandX Опубликовано 11 Июля 2003 Автор Жалоба Поделиться Опубликовано 11 Июля 2003 У меня форум Invision Power Board v1.2 !!!Строчки index.php c 103 по 386 !!!А Строчки functions.php с 2572 по 2941 !!! А зачем тебе это??? Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 Matrix Опубликовано 11 Июля 2003 Жалоба Поделиться Опубликовано 11 Июля 2003 блин.... ну нужно начать с того, после чего это произошло.... рассказывай Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 GrandX Опубликовано 11 Июля 2003 Автор Жалоба Поделиться Опубликовано 11 Июля 2003 Было это так!!!Жили были Дед и Бабка!!! (щучу) Я закачал форум на сайт (ох как долго это было с моим то модемом Sportster 14400)потом раставил Права на папки и на файлыИ начал инсталировать все прошло Удачно и при последнем нажатии да (при котором он начил периходить на главную страницу форума т.е. на index.php) мне выпала эта ошибка !!! (но при проделавании этого всего на localhoste все проходит удачно!!!) Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 theIggs Опубликовано 11 Июля 2003 Жалоба Поделиться Опубликовано 11 Июля 2003 А зачем тебе это???Строчки кода с указанными номерами приведи... Он тебе ясным текстом говорит - лишний $ в functions.php на строке 2582... Телепаты сейчас в отпуске, поэтому без кода никак... Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 GrandX Опубликовано 11 Июля 2003 Автор Жалоба Поделиться Опубликовано 11 Июля 2003 На тебе все начиная с 2580 строки: //------------------------------------------------- // Check ban status //------------------------------------------------- if ( $this->member['temp_ban'] ) { $ban_arr = $std->hdl_ban_line( $this->member['temp_ban'] ); if ( time() >= $ban_arr['date_end'] ) { // Update this member's profile $DB->query("UPDATE ibf_members SET temp_ban='' WHERE id=".intval($this->member['id']) ); } else { $ibforums->member = $this->member; // Set time right $std->Error( array( 'LEVEL' => 1, 'MSG' => 'account_susp', 'INIT' => 1, 'EXTRA' => $std->get_date($ban_arr['date_end'],'LONG') ) ); } } } //------------------------------------------------- // Set a session ID cookie //------------------------------------------------- $std->my_setcookie("session_id", $this->session_id, -1); $ibforums->perm_id = ( $this->member['org_perm_id'] ) ? $this->member['org_perm_id'] : $this->member['g_perm_id']; $ibforums->perm_id_array = explode( ",", $ibforums->perm_id ); return $this->member; } //+------------------------------------------------- // Attempt to load a member //+------------------------------------------------- function load_member($member_id=0) { global $DB, $std, $ibforums; $member_id = intval($member_id); if ($member_id != 0) { $DB->query("SELECT moderator.mid as is_mod, moderator.allow_warn, m.id, m.name, m.mgroup, m.password, m.email, m.restrict_post, m.view_sigs, m.view_avs, m.view_pop, m.view_img, m.auto_track, m.mod_posts, m.language, m.skin, m.new_msg, m.show_popup, m.msg_total, m.time_offset, m.posts, m.joined, m.last_post, m.last_visit, m.last_activity, m.dst_in_use, m.view_prefs, m.org_perm_id, m.temp_ban, g.* FROM ibf_members m LEFT JOIN ibf_groups g ON (g.g_id=m.mgroup) LEFT JOIN ibf_moderators moderator ON (moderator.member_id=m.id OR moderator.group_id=m.mgroup ) WHERE m.id=$member_id"); if ( $DB->get_num_rows() ) { $this->member = $DB->fetch_row(); } //------------------------------------------------- // Unless they have a member id, log 'em in as a guest //------------------------------------------------- if ( ($this->member['id'] == 0) or (empty($this->member['id'])) ) { $this->unload_member(); } } unset($member_id); } //+------------------------------------------------- // Remove the users cookies //+------------------------------------------------- function unload_member() { global $DB, $std, $ibforums; // Boink the cookies $std->my_setcookie( "member_id" , "0", -1 ); $std->my_setcookie( "pass_hash" , "0", -1 ); $this->member['id'] = 0; $this->member['name'] = ""; $this->member['password'] = ""; } //------------------------------------------- // Updates a current session. //------------------------------------------- function update_member_session() { global $DB, $ibforums; // Make sure we have a session id. if ( (empty($this->session_id)) or ($this->session_id == 0) ) { $this->create_member_session(); return; } if (empty($this->member['id'])) { $this->unload_member(); $this->create_guest_session(); return; } $db_str = $DB->compile_db_update_string( array( 'member_name' => $this->member['name'], 'member_id' => intval($this->member['id']), 'member_group' => $this->member['mgroup'], 'in_forum' => intval($ibforums->input['f']), 'in_topic' => intval($ibforums->input['t']), 'login_type' => $ibforums->input['Privacy'], 'running_time' => $this->time_now, 'location' => $ibforums->input['act'].",".$ibforums->input['p'].",".$ibforums->input['CODE'] ) ); $DB->query("UPDATE ibf_sessions SET $db_str WHERE id='{$this->session_id}'"); } //-------------------------------------------------------------------- function update_guest_session() { global $DB, $ibforums, $INFO; // Make sure we have a session id. if ( (empty($this->session_id)) or ($this->session_id == 0) ) { $this->create_guest_session(); return; } $query = "UPDATE ibf_sessions SET member_name='',member_id='0',member_group='".$INFO['guest_group']."'"; $query .= ",login_type='0', running_time='".$this->time_now."', in_forum='".$ibforums->input['f']."', in_topic='".$ibforums->input['t']."', location='".$ibforums->input['act'].",".$ibforums->input['p'].",".$ibforums->input['CODE']."' "; $query .= "WHERE id='".$this->session_id."'"; // Update the database $DB->query($query); } //------------------------------------------- // Get a session based on the current session ID //------------------------------------------- function get_session($session_id="") { global $DB, $INFO, $std; $result = array(); $query = ""; $session_id = preg_replace("/([^a-zA-Z0-9])/", "", $session_id); if ( !empty($session_id) ) { if ($INFO['match_browser'] == 1) { $query = " AND browser='".$this->user_agent."'"; } $DB->query("SELECT id, member_id, running_time, location FROM ibf_sessions WHERE id='".$session_id."' and ip_address='".$this->ip_address."'".$query); if ($DB->get_num_rows() != 1) { // Either there is no session, or we have more than one session.. $this->session_dead_id = $session_id; $this->session_id = 0; $this->session_user_id = 0; return; } else { $result = $DB->fetch_row(); if ($result['id'] == "") { $this->session_dead_id = $session_id; $this->session_id = 0; $this->session_user_id = 0; unset($result); return; } else { $this->session_id = $result['id']; $this->session_user_id = $result['member_id']; $this->last_click = $result['running_time']; $this->location = $result['location']; unset($result); return; } } } } //------------------------------------------- // Creates a member session. //------------------------------------------- function create_member_session() { global $DB, $INFO, $std, $ibforums; if ($this->member['id']) { //--------------------------------- // Remove the defunct sessions //--------------------------------- $INFO['session_expiration'] = $INFO['session_expiration'] ? (time() - $INFO['session_expiration']) : (time() - 3600); $DB->query( "DELETE FROM ibf_sessions WHERE running_time < {$INFO['session_expiration']} or member_id='".$this->member['id']."'"); $this->session_id = md5( uniqid(microtime()) ); //--------------------------------- // Insert the new session //--------------------------------- $DB->query("INSERT INTO ibf_sessions (id, member_name, member_id, ip_address, browser, running_time, location, login_type, member_group) ". "VALUES ('".$this->session_id."', '".$this->member['name']."', '".$this->member['id']."', '".$this->ip_address."', '".$this->user_agent."', '".$this->time_now."', ". "',,', '".$ibforums->input['Privacy']."', ".$this->member['mgroup'].")"); // If this is a member, update their last visit times, etc. if (time() - $this->member['last_activity'] > 300) { //--------------------------------- // Reset the topics read cookie.. //--------------------------------- $std->my_setcookie('topicsread', ''); $DB->query("UPDATE ibf_members SET last_visit=last_activity, last_activity='".$this->time_now."' WHERE id='".$this->member['id']."'"); //--------------------------------- // Fix up the last visit/activity times. //--------------------------------- $ibforums->input['last_visit'] = $this->member['last_activity']; $ibforums->input['last_activity'] = $this->time_now; } } else { $this->create_guest_session(); } } //-------------------------------------------------------------------- function create_guest_session() { global $DB, $INFO, $std, $ibforums; //--------------------------------- // Remove the defunct sessions //--------------------------------- if ( ($this->session_dead_id != 0) and ( ! empty($this->session_dead_id) ) ) { $extra = " or id='".$this->session_dead_id."'"; } else { $extra = ""; } $INFO['session_expiration'] = $INFO['session_expiration'] ? (time() - $INFO['session_expiration']) : (time() - 3600); $DB->query( "DELETE FROM ibf_sessions WHERE running_time < {$INFO['session_expiration']} or ip_address='".$this->ip_address."'".$extra); $this->session_id = md5( uniqid(microtime()) ); //--------------------------------- // Insert the new session //--------------------------------- $DB->query("INSERT INTO ibf_sessions (id, member_name, member_id, ip_address, browser, running_time, location, login_type, member_group) ". "VALUES ('".$this->session_id."', '', '0', '".$this->ip_address."', '".$this->user_agent."', '".$this->time_now."', ". "',,', '0', ".$INFO['guest_group'].")"); } //------------------------------------------- // Creates a BOT session //------------------------------------------- function create_bot_session($bot) { global $DB, $INFO, $std, $ibforums; $db_str = $DB->compile_db_insert_string( array( 'id' => $bot.'_session', 'member_name' => $ibforums->vars['sp_'.$bot], 'member_id' => 0, 'member_group' => $ibforums->vars['spider_group'], 'in_forum' => intval($ibforums->input['f']), 'in_topic' => intval($ibforums->input['t']), 'login_type' => $ibforums->vars['spider_anon'], 'running_time' => $this->time_now, 'location' => $ibforums->input['act'].",".$ibforums->input['p'].",".$ibforums->input['CODE'], 'ip_address' => $this->ip_address, 'browser' => $this->user_agent, ) ); $DB->query("INSERT INTO ibf_sessions ({$db_str['FIELD_NAMES']}) VALUES({$db_str['FIELD_VALUES']})"); } //------------------------------------------- // Updates a BOT current session. //------------------------------------------- function update_bot_session($bot) { global $DB, $ibforums, $INFO; $db_str = $DB->compile_db_update_string( array( 'member_name' => $ibforums->vars['sp_'.$bot], 'member_id' => 0, 'member_group' => $ibforums->vars['spider_group'], 'in_forum' => intval($ibforums->input['f']), 'in_topic' => intval($ibforums->input['t']), 'login_type' => $ibforums->vars['spider_anon'], 'running_time' => $this->time_now, 'location' => $ibforums->input['act'].",".$ibforums->input['p'].",".$ibforums->input['CODE'] ) ); $DB->query("UPDATE ibf_sessions SET $db_str WHERE id='".$bot."_session'"); } } ?> Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 theIggs Опубликовано 11 Июля 2003 Жалоба Поделиться Опубликовано 11 Июля 2003 Спорим, с первого раза не угадаю, какая строка тут 2582ая? Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 GrandX Опубликовано 11 Июля 2003 Автор Жалоба Поделиться Опубликовано 11 Июля 2003 И нате вам index.php начиная 105 строки: //--------------------------------// Require our global functions//-------------------------------- require ROOT_PATH."sources/functions.php"; $std = new FUNC;$print = new display();$sess = new session();//--------------------------------// Load the DB driver and such//-------------------------------- $INFO['sql_driver'] = !$INFO['sql_driver'] ? 'mySQL' : $INFO['sql_driver']; $to_require = ROOT_PATH."sources/Drivers/".$INFO['sql_driver'].".php";require ($to_require); $DB = new db_driver; $DB->obj['sql_database'] = $INFO['sql_database'];$DB->obj['sql_user'] = $INFO['sql_user'];$DB->obj['sql_pass'] = $INFO['sql_pass'];$DB->obj['sql_host'] = $INFO['sql_host'];$DB->obj['sql_tbl_prefix'] = $INFO['sql_tbl_prefix']; $DB->obj['debug'] = ($INFO['sql_debug'] == 1) ? $_GET['debug'] : 0; // Get a DB connection $DB->connect(); //--------------------------------// Wrap it all up in a nice easy to// transport super class//-------------------------------- $ibforums = new info(); //--------------------------------// Set up our vars//-------------------------------- $ibforums->input = $std->parse_incoming(); //--------------------------------// Short tags...//-------------------------------- if ( $ibforums->input['showforum'] != "" ){ $ibforums->input['act'] = "SF"; $ibforums->input['f'] = intval($ibforums->input['showforum']);}else if ( $ibforums->input['showtopic'] != ""){ $ibforums->input['act'] = "ST"; $ibforums->input['t'] = intval($ibforums->input['showtopic']); // Grab and cache the topic now as we need the 'f' attr for // the skins... $DB->query("SELECT t.*, f.topic_mm_id, f.name as forum_name, f.quick_reply, f.id as forum_id, f.read_perms, f.reply_perms, f.parent_id, f.use_html, f.start_perms, f.allow_poll, f.password, f.posts as forum_posts, f.topics as forum_topics, f.upload_perms, f.show_rules, f.rules_text, f.rules_title, c.name as cat_name, c.id as cat_id FROM ibf_topics t, ibf_forums f , ibf_categories c WHERE t.tid=".$ibforums->input['t']." and f.id = t.forum_id and f.category=c.id"); $ibforums->topic_cache = $DB->fetch_row(); $ibforums->input['f'] = $ibforums->topic_cache['forum_id'];}else if ( $ibforums->input['showuser'] != ""){ $ibforums->input['act'] = "Profile"; $ibforums->input['MID'] = intval($ibforums->input['showuser']);}else{ $ibforums->input['act'] = $ibforums->input['act'] == '' ? "idx" : $ibforums->input['act'];} //--------------------------------// The rest //-------------------------------- $ibforums->member = $sess->authorise();$ibforums->skin = $std->load_skin();$ibforums->lastclick = $sess->last_click;$ibforums->location = $sess->location;$ibforums->session_id = $sess->session_id; list($ppu,$tpu) = explode( "&", $ibforums->member['view_prefs'] ); $ibforums->vars['display_max_topics'] = ($tpu > 0) ? $tpu : $ibforums->vars['display_max_topics'];$ibforums->vars['display_max_posts'] = ($ppu > 0) ? $ppu : $ibforums->vars['display_max_posts']; //--------------------------------// Set up the session ID stuff//-------------------------------- if ( $ibforums->session_type == 'cookie' ){ $ibforums->session_id = ""; $ibforums->base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext'].'?';}else{ $ibforums->base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext'].'?s='.$ibforums->session_id.'&';} $ibforums->js_base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext'].'?s='.$ibforums->session_id.'&'; //--------------------------------// Set up the forum_read cookie//-------------------------------- $std->hdl_forum_read_cookie(); //--------------------------------// Set up the skin stuff//-------------------------------- $ibforums->skin_rid = $ibforums->skin['set_id'];$ibforums->skin_id = 's'.$ibforums->skin['set_id']; $ibforums->vars['img_url'] = 'style_images/' . $ibforums->skin['img_dir']; //--------------------------------// Set up our language choice//-------------------------------- if ($ibforums->vars['default_language'] == ""){ $ibforums->vars['default_language'] = 'en';} $ibforums->lang_id = $ibforums->member['language'] ? $ibforums->member['language'] : $ibforums->vars['default_language']; if ( ($ibforums->lang_id != $ibforums->vars['default_language']) and (! is_dir( ROOT_PATH."lang/".$ibforums->lang_id ) ) ){ $ibforums->lang_id = $ibforums->vars['default_language'];} $ibforums->lang = $std->load_words($ibforums->lang, 'lang_global', $ibforums->lang_id); //-------------------------------- $skin_universal = $std->load_template('skin_global'); //-------------------------------- if ($ibforums->input['act'] != 'Login' and $ibforums->input['act'] != 'Reg' and $ibforums->input['act'] != 'Attach'){ //-------------------------------- // Do we have permission to view // the board? //-------------------------------- if ($ibforums->member['g_view_board'] != 1) { $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_view_board') ); } //-------------------------------- // Is the board offline? //-------------------------------- if ($ibforums->vars['board_offline'] == 1) { if ($ibforums->member['g_access_offline'] != 1) { $std->board_offline(); } } //-------------------------------- // Is log in enforced? //-------------------------------- if ( (! $ibforums->member['id']) and ($ibforums->vars['force_login'] == 1) ) { require ROOT_PATH."sources/Login.php"; } } //--------------------------------// Decide what to do//-------------------------------- $choice = array( "idx" => "Boards", "SC" => "Boards", "SF" => "Forums", "SR" => "Forums", "ST" => "Topics", "Login" => "Login", "Post" => "Post", "Poll" => "lib/add_poll", "Reg" => "Register", "Online" => "Online", "Members" => "Memberlist", "Help" => "Help", "Search" => "Search", "Mod" => "Moderate", "Print" => "misc/print_page", "Forward" => "misc/forward_page", "Mail" => "misc/contact_member", "Invite" => "misc/contact_member", "ICQ" => "misc/contact_member", "AOL" => "misc/contact_member", "YAHOO" => "misc/contact_member", "MSN" => "misc/contact_member", "report" => "misc/contact_member", "chat" => "misc/contact_member", "integ" => "misc/contact_member", "Msg" => "Messenger", "UserCP" => "Usercp", "Profile" => "Profile", "Track" => "misc/tracker", "Stats" => "misc/stats", "Attach" => "misc/attach", 'ib3' => 'misc/ib3', 'legends' => 'misc/legends', 'modcp' => 'mod_cp', 'calendar' => "calendar", 'buddy' => "browsebuddy", 'boardrules' => "misc/contact_member", 'mmod' => "misc/multi_moderate", 'warn' => "misc/warn", ); /***************************************************/// // Check to make sure the array key exits.. if (! isset($choice[ $ibforums->input['act'] ]) ){ $ibforums->input['act'] = 'idx';} // Require and run require ROOT_PATH."sources/".$choice[ $ibforums->input['act'] ].".php"; //+-------------------------------------------------// GLOBAL ROUTINES//+------------------------------------------------- function fatal_error($message="", $help="") { echo("$message<br><br>$help"); exit;}?> Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 theIggs Опубликовано 11 Июля 2003 Жалоба Поделиться Опубликовано 11 Июля 2003 Балин... ты бы строчки хоть, в которых ошибки показывает, выделил... Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 GrandX Опубликовано 11 Июля 2003 Автор Жалоба Поделиться Опубликовано 11 Июля 2003 Я все отредактировал !!! смотри выше!!!!!!!! Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 theIggs Опубликовано 13 Июля 2003 Жалоба Поделиться Опубликовано 13 Июля 2003 Чё-то ваще форум не открывается...Рекомендую перезалить файлы... т.к. судя по всему, что-то где-то недокачалось... Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 ph0en1x Опубликовано 11 Августа 2004 Жалоба Поделиться Опубликовано 11 Августа 2004 Чуваки, у меня в русифицированной версии IPB 1.3 при запуске sm_install.php вот такой косяк: Parse error: parse error, unexpected $ in /home/djmusic/public_html/new/forum/sm_install.php on line 1 Что за глюк? Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 Dekker Опубликовано 11 Августа 2004 Жалоба Поделиться Опубликовано 11 Августа 2004 ph0en1x чувак, тебе в форум Общие вопросы (по 1.2 и 1.3) Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 marsel_tlt Опубликовано 20 Августа 2004 Жалоба Поделиться Опубликовано 20 Августа 2004 чо это значит,подскажите,а? Fatal error: Call to undefined function: active_list_sep() in z:\home\mechnet.ru\www\sources\Boards.php on line 57 Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 Dekker Опубликовано 20 Августа 2004 Жалоба Поделиться Опубликовано 20 Августа 2004 вкратце в надцатый раз, подобно происходит при установке нового скина, поскольку скин заточен под стандартный код инвижина, а вы пользите модифицированый код, в исходном коде нет функции quick_reply_new, так что перенесите ее ручками из файла skin_topic.php который идет вместе с форумом который скачали здесь, вообщем смотрим наличие этой функции в этом файле. тоже самое относиться к active_list_sep() Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
Вопрос
GrandX
Parse error: parse error, unexpected $ in /home/c/clanspirits.9.com1.ru/WWW/forum/sources/functions.php on line 2582
Fatal error: Cannot instantiate non-existent class: session in /home/c/clanspirits.9.com1.ru/WWW/forum/index.php on line 113
Можете посмотреть так http://www.clanspirits.ru/forum/index.php
Ссылка на комментарий
Поделиться на других сайтах
15 ответов на этот вопрос
Рекомендуемые сообщения
Присоединиться к обсуждению
Вы можете ответить сейчас, а зарегистрироваться позже. Если у вас уже есть аккаунт, войдите, чтобы ответить от своего имени.