SimplePortal

Support => Install and Upgrade => Topic started by: Contra on November 26, 2008, 08:41:25 PM

Title: 2.1 error
Post by: Contra on November 26, 2008, 08:41:25 PM
i anstalled 2.1 just a few min. ago

2.05 classic work perfectly
but now i get this

Fatal error: Call to undefined function sportal_vital() in /home/contra36/public_html/Sources/Subs.php on line 3464

it is in place of the copyright and such (at the footer)

here is my sites link

www.offroadjunkies.net
Title: Re: 2.1 error
Post by: [SiNaN] on November 27, 2008, 01:42:55 AM
Did you uninstall 2.0.5 before installing it? If yes, attach your Subs.php file here.
Title: Re: 2.1 error
Post by: Contra on November 27, 2008, 02:50:17 AM
yes i did, i also tried un installing 2.1 and re- installing it

but when i uninstalled it, site crashed...

so i put up a page reflecting that
Title: Re: 2.1 error
Post by: [SiNaN] on November 27, 2008, 06:04:58 AM
Seems like it is not installed correctly.

Can you attach your index.php file here?
Title: Re: 2.1 error
Post by: Contra on November 27, 2008, 11:58:06 PM
also to mention i did manage to get the site back up but,
when i try to log out or check server settings or change nearly any admin options it says

Session verification failed. Please try logging out and back in again, and then try again.

it also appears to say this too

"Your session timed out while posting. Please try to re-submit your message."
i cant post anything...i dont think anyone else can either

ever since the install

here is my index.php

Code: [Select]
<?php
/**********************************************************************************
* index.php                                                                       *
***********************************************************************************
* SMF: Simple Machines Forum                                                      *
* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    *
* =============================================================================== *
* Software Version:           SMF 1.1.5                                           *
* Software by:                Simple Machines (http://www.simplemachines.org)     *
* Copyright 2006-2007 by:     Simple Machines LLC (http://www.simplemachines.org) *
*           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             *
* Support, News, Updates at:  http://www.simplemachines.org                       *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under   *
* the terms of the provided license as published by Simple Machines LLC.          *
*                                                                                 *
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* See the "license.txt" file for details of the Simple Machines license.          *
* The latest version can always be found at http://www.simplemachines.org.        *
**********************************************************************************/


/* This, as you have probably guessed, is the crux on which SMF functions.
Everything should start here, so all the setup and security is done
properly.  The most interesting part of this file is the action array in
the smf_main() function.  It is formatted as so:

'action-in-url' => array('Source-File.php', 'FunctionToCall'),

Then, you can access the FunctionToCall() function from Source-File.php
with the URL index.php?action=action-in-url.  Relatively simple, no?
*/

$forum_version 'SMF 1.1.5';

// Get everything started up...
define('SMF'1);
@
set_magic_quotes_runtime(0);
error_reporting(E_ALL);
$time_start microtime();

// Make sure some things simply do not exist.
foreach (array('db_character_set') as $variable)
if (isset($GLOBALS[$variable]))
unset($GLOBALS[$variable]);

// Load the settings...
require_once(dirname(__FILE__) . '/Settings.php');

// And important includes.
require_once($sourcedir '/QueryString.php');
require_once(
$sourcedir '/Subs.php');
require_once(
$sourcedir '/Errors.php');
require_once(
$sourcedir '/Load.php');
require_once(
$sourcedir '/Security.php');
/** Page Manager **/
if (file_exists($sourcedir '/LoadPages.php'))
require_once($sourcedir '/LoadPages.php');
require_once(
$sourcedir '/SPortal1-1.php');
if (
file_exists($sourcedir '/LoadAds.php'))
require_once($sourcedir '/LoadAds.php');

// Using an old version of PHP?
if (@version_compare(PHP_VERSION'4.2.3') != 1)
require_once($sourcedir '/Subs-Compat.php');

// If $maintenance is set specifically to 2, then we're upgrading or something.
if (!empty($maintenance) && $maintenance == 2)
db_fatal_error();

// Connect to the MySQL database.
if (empty($db_persist))
$db_connection = @mysql_connect($db_server$db_user$db_passwd);
else
$db_connection = @mysql_pconnect($db_server$db_user$db_passwd);

// Show an error if the connection couldn't be made.
if (!$db_connection || !@mysql_select_db($db_name$db_connection))
db_fatal_error();

// Load the settings from the settings table, and perform operations like optimizing.
reloadSettings();
// Clean the request variables, add slashes, etc.
cleanRequest();
$context = array();

// Seed the random generator for PHP < 4.2.0.
if (@version_compare(PHP_VERSION'4.2.0') == -1)
smf_seed_generator();

// Determine if this is using WAP, WAP2, or imode.  Technically, we should check that wap comes before application/xhtml or text/html, but this doesn't work in practice as much as it should.
if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false)
$_REQUEST['wap2'] = 1;
elseif (isset(
$_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false)
{
if (strpos($_SERVER['HTTP_USER_AGENT'], 'DoCoMo/') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'portalmmm/') !== false)
$_REQUEST['imode'] = 1;
else
$_REQUEST['wap'] = 1;
}

if (!
defined('WIRELESS'))
define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']));

// Some settings and headers are different for wireless protocols.
if (WIRELESS)
{
define('WIRELESS_PROTOCOL', isset($_REQUEST['wap']) ? 'wap' : (isset($_REQUEST['wap2']) ? 'wap2' : (isset($_REQUEST['imode']) ? 'imode' '')));

// Some cellphones can't handle output compression...
$modSettings['enableCompressedOutput'] = '0';
// !!! Do we want these hard coded?
$modSettings['defaultMaxMessages'] = 5;
$modSettings['defaultMaxTopics'] = 9;

// Wireless protocol header.
if (WIRELESS_PROTOCOL == 'wap')
header('Content-Type: text/vnd.wap.wml');
}

// Check if compressed output is enabled, supported, and not already being done.
if (!empty($modSettings['enableCompressedOutput']) && !headers_sent() && ob_get_length() == 0)
{
// If zlib is being used, turn off output compression.
if (@ini_get('zlib.output_compression') == '1' || @ini_get('output_handler') == 'ob_gzhandler' || @version_compare(PHP_VERSION'4.2.0') == -1)
$modSettings['enableCompressedOutput'] = '0';
else
ob_start('ob_gzhandler');
}
// This makes it so headers can be sent!
if (empty($modSettings['enableCompressedOutput']))
ob_start();

// Register an error handler.
set_error_handler('error_handler');

// Start the session. (assuming it hasn't already been.)
loadSession();

// What function shall we execute? (done like this for memory's sake.)
call_user_func(smf_main());

// Call obExit specially; we're coming from the main area ;).
obExit(nullnulltrue);

// The main controlling function.
function smf_main()
{
global $modSettings$settings$user_info$board$topic$maintenance$sourcedir;

// Special case: session keep-alive.
if (isset($_GET['action']) && $_GET['action'] == 'keepalive')
die;

// Load the user's cookie (or set as guest) and load their settings.
loadUserSettings();

// Load the current board's information.
loadBoard();

// Load the current theme.  (note that ?theme=1 will also work, may be used for guest theming.)
loadTheme();

// Check if the user should be disallowed access.
is_not_banned();

// Load the current user's permissions.
loadPermissions();
/** Page Manager **/
if (function_exists("loadPages"))
loadPages();

// Load all the ads up
if (function_exists("loadAds"))
loadAds();


// Do some logging, unless this is an attachment, avatar, theme option or XML feed.
if (empty($_REQUEST['action']) || !in_array($_REQUEST['action'], array('dlattach''jsoption''.xml')))
{
// Log this user as online.
writeLog();

// Track forum statistics and hits...?
if (!empty($modSettings['hitStats']))
trackStats(array('hits' => '+'));
}

// Is the forum in maintenance mode? (doesn't apply to administrators.)
if (!empty($maintenance) && !allowedTo('admin_forum'))
{
// You can only login.... otherwise, you're getting the "maintenance mode" display.
if (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'login2' || $_REQUEST['action'] == 'logout'))
{
require_once($sourcedir '/LogInOut.php');
return $_REQUEST['action'] == 'login2' 'Login2' 'Logout';
}
// Don't even try it, sonny.
else
{
require_once($sourcedir '/Subs-Auth.php');
return 'InMaintenance';
}
}
// If guest access is off, a guest can only do one of the very few following actions.
elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('login''login2''register''register2''reminder''activate''smstats''help''.xml''verificationcode'))))
{
require_once($sourcedir '/Subs-Auth.php');
return 'KickGuest';
}
elseif (empty($_REQUEST['action']))
{
// Action and board are both empty... BoardIndex!
if (empty($board) && empty($topic))
{
require_once($sourcedir '/BoardIndex.php');
return 'BoardIndex';
}
// Topic is empty, and action is empty.... MessageIndex!
elseif (empty($topic))
{
require_once($sourcedir '/MessageIndex.php');
return 'MessageIndex';
}
// Board is not empty... topic is not empty... action is empty.. Display!
else
{
require_once($sourcedir '/Display.php');
return 'Display';
}
}

// Here's the monstrous $_REQUEST['action'] array - $_REQUEST['action'] => array($file, $function).
$actionArray = array(

'smfbuy' => array('SMFbuy.php''SMFbuy'),
'usercp' => array('usercp.php''usercp'),'activate' => array('Register.php''Activate'),
'admin' => array('Admin.php''Admin'),
'announce' => array('Post.php''AnnounceTopic'),
'ban' => array('ManageBans.php''Ban'),
'boardrecount' => array('Admin.php''AdminBoardRecount'),
'buddy' => array('Subs-Members.php''BuddyListToggle'),
'calendar' => array('Calendar.php''CalendarMain'),
'cleanperms' => array('Admin.php''CleanupPermissions'),
'collapse' => array('Subs-Boards.php''CollapseCategory'),
'convertentities' => array('Admin.php''ConvertEntities'),
'convertutf8' => array('Admin.php''ConvertUtf8'),
'coppa' => array('Register.php''CoppaForm'),
'deletemsg' => array('RemoveTopic.php''DeleteMessage'),
'detailedversion' => array('Admin.php''VersionDetail'),
'display' => array('Display.php''Display'),
'dlattach' => array('Display.php''Download'),
'dumpdb' => array('DumpDatabase.php''DumpDatabase2'),
'editpoll' => array('Poll.php''EditPoll'),
'editpoll2' => array('Poll.php''EditPoll2'),
'featuresettings' => array('ModSettings.php''ModifyFeatureSettings'),
'featuresettings2' => array('ModSettings.php''ModifyFeatureSettings2'),
'findmember' => array('Subs-Auth.php''JSMembers'),
'forum' => array('BoardIndex.php''BoardIndex'),
'spadmin' => array('SPortalAdmin1-1.php''SPortalAdmin'),
'help' => array('Help.php''ShowHelp'), 'gallery' => array('Gallery.php''GalleryMain'),
'helpadmin' => array('Help.php''ShowAdminHelp'),
'im' => array('PersonalMessage.php''MessageMain'),
'jsoption' => array('Themes.php''SetJavaScript'),
'jsmodify' => array('Post.php''JavaScriptModify'),
'lock' => array('LockTopic.php''LockTopic'),
'lockVoting' => array('Poll.php''LockVoting'),
'login' => array('LogInOut.php''Login'),
'login2' => array('LogInOut.php''Login2'),
'logout' => array('LogInOut.php''Logout'),
'maintain' => array('Admin.php''Maintenance'),
'manageattachments' => array('ManageAttachments.php''ManageAttachments'),
'manageboards' => array('ManageBoards.php''ManageBoards'),
'managecalendar' => array('ManageCalendar.php''ManageCalendar'),
'managesearch' => array('ManageSearch.php''ManageSearch'),
'markasread' => array('Subs-Boards.php''MarkRead'),
'membergroups' => array('ManageMembergroups.php''ModifyMembergroups'),
'mergetopics' => array('SplitTopics.php''MergeTopics'),
'mlist' => array('Memberlist.php''Memberlist'),
'modifycat' => array('ManageBoards.php''ModifyCat'),
'modifykarma' => array('Karma.php''ModifyKarma'),
'modlog' => array('Modlog.php''ViewModlog'),
'movetopic' => array('MoveTopic.php''MoveTopic'),
'movetopic2' => array('MoveTopic.php''MoveTopic2'),
'news' => array('ManageNews.php''ManageNews'),
'savepad' => array('PersonalPad.php''SavePad'),
'notesave' => array('Notepad.php''SaveNote'),
'notify' => array('Notify.php''Notify'),
'notifyboard' => array('Notify.php''BoardNotify'),
'optimizetables' => array('Admin.php''OptimizeTables'),
'packageget' => array('PackageGet.php''PackageGet'),
'packages' => array('Packages.php''Packages'),
'permissions' => array('ManagePermissions.php''ModifyPermissions'),
'pgdownload' => array('PackageGet.php''PackageGet'),
'pm' => array('PersonalMessage.php''MessageMain'),
'post' => array('Post.php''Post'),
'post2' => array('Post.php''Post2'),
'postsettings' => array('ManagePosts.php''ManagePostSettings'),
'printpage' => array('Printpage.php''PrintTopic'),
'profile' => array('Profile.php''ModifyProfile'),
'profile2' => array('Profile.php''ModifyProfile2'),
'quotefast' => array('Post.php''QuoteFast'),
'quickmod' => array('Subs-Boards.php''QuickModeration'),
'quickmod2' => array('Subs-Boards.php''QuickModeration2'),
'recent' => array('Recent.php''RecentPosts'),
'regcenter' => array('ManageRegistration.php''RegCenter'),
'register' => array('Register.php''Register'),
'register2' => array('Register.php''Register2'),
'reminder' => array('Reminder.php''RemindMe'),
'removetopic2' => array('RemoveTopic.php''RemoveTopic2'),
'removeoldtopics2' => array('RemoveTopic.php''RemoveOldTopics2'),
'removepoll' => array('Poll.php''RemovePoll'),
'repairboards' => array('RepairBoards.php''RepairBoards'),
'reporttm' => array('SendTopic.php''ReportToModerator'),
'reports' => array('Reports.php''ReportsMain'),
'requestmembers' => array('Subs-Auth.php''RequestMembers'),
'search' => array('Search.php''PlushSearch1'),
'search2' => array('Search.php''PlushSearch2'),
'sendtopic' => array('SendTopic.php''SendTopic'),
'serversettings' => array('ManageServer.php''ModifySettings'),
'serversettings2' => array('ManageServer.php''ModifySettings2'),
'smileys' => array('ManageSmileys.php''ManageSmileys'),
'smstats' => array('Stats.php''SMStats'),
'spellcheck' => array('Subs-Post.php''SpellCheck'),
'splittopics' => array('SplitTopics.php''SplitTopics'),
'stats' => array('Stats.php''DisplayStats'),
'sticky' => array('LockTopic.php''Sticky'), 'staff' => array('Staff.php''Staff'),
'welcome' => array('WelcomeTopic.php''WelcomeTopic'),
'theme' => array('Themes.php''ThemesMain'),
'trackip' => array('Profile.php''trackIP'),
/** Page Manager next 2 items **/
'pgmod' => array('Pages.php''Pages'),
'page' => array('Pages.php''ShowPages'), 'trader' => array('Trader.php''tradermain'),
'admod' => array('Ads.php''Ads'),
'about:mozilla' => array('Karma.php''BookOfUnknown'),
'about:unknown' => array('Karma.php''BookOfUnknown'),
'unread' => array('Recent.php''UnreadTopics'),
'unreadreplies' => array('Recent.php''UnreadTopics'),
'viewErrorLog' => array('ManageErrors.php''ViewErrorLog'),
'viewmembers' => array('ManageMembers.php''ViewMembers'),
'viewprofile' => array('Profile.php''ModifyProfile'),
'verificationcode' => array('Register.php''VerificationCode'),
'vote' => array('Poll.php''Vote'),
'viewquery' => array('ViewQuery.php''ViewQuery'),
'who' => array('Who.php''Who'),
'.xml' => array('News.php''ShowXmlFeed'),
'rules' => array('Rules.php''Rules'),
);

// Get the function and file to include - if it's not there, do the board index.
if (!isset($_REQUEST['action']) || !isset($actionArray[$_REQUEST['action']]))
{
// Catch the action with the theme?
if (!empty($settings['catch_action']))
{
require_once($sourcedir '/Themes.php');
return 'WrapAction';
}

// Fall through to the board index then...
require_once($sourcedir '/BoardIndex.php');
return 'BoardIndex';
}

// Otherwise, it was set - so let's go to that action.
require_once($sourcedir '/' $actionArray[$_REQUEST['action']][0]);
return $actionArray[$_REQUEST['action']][1];
}

?>
Title: Re: 2.1 error
Post by: Contra on November 28, 2008, 12:49:20 AM

here is the new error

Fatal error: Call to undefined function sportal_vital() in /home/contra36/public_html/Sources/Subs.php on line 3450

this is line 3450 "sportal_vital();"  i dont understand...

well i got most everything to work correctly, but it still has this error at the bottom of the page and no Copyright info at all
and at the top of the forum page the panel borders are out of alignment, they actually shouldnt be there at all

www.offroadjunkies.net
Title: Re: 2.1 error
Post by: [SiNaN] on November 28, 2008, 07:05:10 AM
Attach your Subs.php file.

If you have any other errors, attach all the files modified by SimplePortal.
Title: Re: 2.1 error
Post by: Contra on November 28, 2008, 09:49:38 AM
Code: [Select]
/**********************************************************************************
* Subs.php                                                                        *
***********************************************************************************
* SMF: Simple Machines Forum                                                      *
* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    *
* =============================================================================== *
* Software Version:           SMF 1.1.5                                           *
* Software by:                Simple Machines (http://www.simplemachines.org)     *
* Copyright 2006-2007 by:     Simple Machines LLC (http://www.simplemachines.org) *
*           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             *
* Support, News, Updates at:  http://www.simplemachines.org                       *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under   *
* the terms of the provided license as published by Simple Machines LLC.          *
*                                                                                 *
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* See the "license.txt" file for details of the Simple Machines license.          *
* The latest version can always be found at http://www.simplemachines.org.        *
**********************************************************************************/
if (!defined('SMF'))
die('Hacking attempt...');

/* This file has all the main functions in it that relate to, well,
everything.  It provides all of the following functions:

resource db_query(string database_query, string __FILE__, int __LINE__)
- should always be used in place of mysql_query.
- executes a query string, and implements needed error checking.
- always use the magic constants __FILE__ and __LINE__.
- returns a MySQL result resource, to be freed with mysql_free_result.

int db_affected_rows()
- should always be used in place of db_insert_id.
- returns the number of affected rows by the most recently executed
  query.
- handles the current connection so the forum with other connections
  active at the same time.

int db_insert_id()
- should always be used in place of mysql_insert_id.
- returns the most recently generated auto_increment column.
- handles the current connection so the forum with other connections
  active at the same time.

void updateStats(string statistic, string condition = '1')
- statistic can be 'member', 'message', 'topic', 'calendar', or
  'postgroups'.
- parameter1 and parameter2 are optional, and are used to update only
  those stats that need updating.
- the 'member' statistic updates the latest member, the total member
  count, and the number of unapproved members.
- 'member' also only counts approved members when approval is on, but
  is much more efficient with it off.
- updating 'message' changes the total number of messages, and the
  highest message id by ID_MSG - which can be parameters 1 and 2,
  respectively.
- 'topic' updates the total number of topics, or if parameter1 is true
  simply increments them.
- the 'calendar' statistic updates the cache of the calendar
  information for a day before and after today.
- the 'postgroups' case updates those members who match condition's
  post-based membergroups in the database (restricted by parameter1).
Title: Re: 2.1 error
Post by: [SiNaN] on November 28, 2008, 09:55:41 AM
Shouln't be that big. What's the error you get?
Title: Re: 2.1 error
Post by: Contra on November 28, 2008, 09:59:47 AM
says, "no text intered, please try again"  and "the the message exceeds the max allowed length of 2000 charcters"


so i am breaking it up...
Title: Re: 2.1 error
Post by: [SiNaN] on November 28, 2008, 10:02:10 AM
Ah, do not paste it.

Click "Additional Options" text on the post page and you will see the attachment options. You can attach the file directly from there.
Title: Re: 2.1 error
Post by: Contra on November 28, 2008, 10:04:59 AM
ok here we go
Title: Re: 2.1 error
Post by: [SiNaN] on November 28, 2008, 10:12:22 AM
Try the attached.
Title: Re: 2.1 error
Post by: Contra on November 28, 2008, 10:18:25 AM
wow works great...

except the header is still messed up, take a look at the "forum page"
Title: Re: 2.1 error
Post by: [SiNaN] on November 28, 2008, 10:27:33 AM
I don't think SimplePortal would cause that, if you mean the missing center image for the header just under the menu.
Title: Re: 2.1 error
Post by: Contra on November 28, 2008, 10:36:27 AM
yes, it wasnt like that before though...all i can guess is a conflict with a mod?

here is my other site, i built it nearly the same way except i am using Tiny Portal

this is how it looked with SP before i installed 2.1

Title: Re: 2.1 error
Post by: [SiNaN] on November 28, 2008, 10:42:10 AM
Does this fix it:

SPortal1-1.php

Find:

Code: [Select]
$context['linktree'] = array();
Replace:

Code: [Select]
$context['linktree'] = $context['linktree'];
Title: Re: 2.1 error
Post by: Contra on November 28, 2008, 10:49:33 AM
works perfect....thanks for all your help....
Title: Re: 2.1 error
Post by: [SiNaN] on November 28, 2008, 10:49:56 AM
You're welcome.
SimplePortal 2.3.8 © 2008-2024, SimplePortal