• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Global Error Fix /UberCms

Status
Not open for further replies.
Joined
Oct 13, 2009
Messages
881
Reaction score
118
Hello Guys some of u all might get and error on you Hotel about Global eror it should say this.

PHP:
set_magic_quotes_runtime('0');

This is Just The simple fix for it.Just replease old code with one below.

PHP:
ini_set("magic_quotes_runtime", 0);

The reason you go that error was because php.net Updated it.

Sorry If it was already released.
 
Skilled Illusionist
Joined
Jul 13, 2007
Messages
386
Reaction score
15
Thanks for this, will be useful for alot of people!
 
Junior Spellweaver
Joined
Dec 6, 2009
Messages
133
Reaction score
131
this is for php 5.3.x because on php 5.3.x the function is decapreted !
 
Last edited:
Initiate Mage
Joined
Mar 10, 2011
Messages
4
Reaction score
0
Edited below. READ for code.
 
Last edited:
Skilled Illusionist
Joined
Oct 19, 2010
Messages
391
Reaction score
70
When you delete the line the error is fixed too ?
 
Initiate Mage
Joined
Mar 10, 2011
Messages
4
Reaction score
0
Just copy this code below and put it in your global.php - It worked for me.

Code:
<?php
/*=======================================================================
| UberCMS - Advanced Website and Content Management System for uberEmu
| #######################################################################
| Copyright (c) 2010, Roy 'Meth0d' and updates by Matthew 'MDK'
| http://www.meth0d.org & http://www.sulake.biz
| #######################################################################
| 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 3 of the License, or
| (at your option) any later version.
| #######################################################################
| This program is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
| GNU General Public License for more details.
\======================================================================*/


// ############################################################################
// Prepare the local environment

define('UBER', true);
define('DS', DIRECTORY_SEPARATOR);
define('LB', chr(13));
define('CWD', str_replace('manage' . DS, '', dirname(__FILE__) . DS));
define('INCLUDES', CWD . 'inc' . DS);
define('USER_IP', $_SERVER['REMOTE_ADDR']);

ini_set("magic_quotes_runtime", 0);
error_reporting(E_ALL);

session_start();


// ############################################################################
// Initialize core classes

require_once INCLUDES . "class.core.php";
require_once INCLUDES . "class.db.mysql.php";
require_once INCLUDES . "class.cron.php";
require_once INCLUDES . "class.users.php";
require_once INCLUDES . "class.tpl.php";

$core = new uberCore();
$cron = new uberCron();
$users = new uberUsers();
$tpl = new uberTpl();


// ############################################################################
// Execute some required core functionality

$core->ParseConfig();

$db = new MySQL($core->config['MySQL']['hostname'], $core->config['MySQL']['username'],
	$core->config['MySQL']['password'], $core->config['MySQL']['database']);
$db->Connect();

$cron->Execute();

// ############################################################################
// Session handling

if (isset($_SESSION['UBER_USER_N']) && isset($_SESSION['UBER_USER_H']))
{
	$userN = $_SESSION['UBER_USER_N'];
	$userH = $_SESSION['UBER_USER_H'];
	
	if ($users->ValidateUser($userN, $userH))
	{
		define('LOGGED_IN', true);
		define('USER_NAME', $userN);
		define('USER_ID', $users->name2id($userN));
		define('USER_HASH', $userH);
		
		$users->CacheUser(USER_ID);
	}
	else
	{
		@session_destroy();
		header('Location: ./index.html');
		exit;
	}	
}
else
{
	define('LOGGED_IN', false);
	define('USER_NAME', 'Guest');
	define('USER_ID', -1);
	define('USER_HASH', null);
}

define('FORCE_MAINTENANCE', ((uberCore::GetMaintenanceStatus() == "1") ? true : false));

if (FORCE_MAINTENANCE && !defined('IN_MAINTENANCE'))
{
	if (!LOGGED_IN || !$users->HasFuse(USER_ID, 'fuse_ignore_maintenance'))
	{
		header("Location: " . WWW . "/maintenance.html");
		exit;
	}
}

if ((!defined('BAN_PAGE') || !BAN_PAGE) && ($users->IsIpBanned(USER_IP) || (LOGGED_IN && $users->IsUserBanned(USER_NAME))))
{
	header("Location: " . WWW . "/banned.php");
	exit;
}

$core->CheckCookies();

// ############################################################################
// Some commonly used functions for easy access

function dbquery($strQuery = '')
{
	global $db;
	
	if($db->IsConnected())
	{
		return $db->DoQuery($strQuery);
	}
	
	return $db->Error('Could not process query, no active db connection detected..');
}

function filter($strInput = '')
{
	global $core;
	
	return $core->FilterInputString($strInput);
}

function clean($strInput = '', $ignoreHtml = false, $nl2br = false)
{
	global $core;
	
	return $core->CleanStringForOutput($strInput, $ignoreHtml, $nl2br);
}

function shuffle_assoc(&$array)
{
	$keys = array_keys($array);

	shuffle($keys);

	foreach($keys as $key)
	{
		$new[$key] = $array[$key];
	}

	$array = $new;

	return true;
}

?>
 
Skilled Illusionist
Joined
Jul 2, 2009
Messages
313
Reaction score
139
ini_set("magic_quotes_runtime", 0);
error_reporting(E_ALL);

The reason people getting errors, is because people remove this: error_reporting(E_ALL);

Deprecated isnt enabled when you download it. That means: It wont show deprecated functions. Just dont duck arround with somebody's code. And you'll never have problems. Every PHP coder creating a website knows how to patch this.

And this is the most simply release ever seen.
Guess you wanna upgrade your post count >_>
 
Status
Not open for further replies.
Back
Top