MyBB Community Forums

Full Version: MyBB Internal Error!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

If I call my forum, i got an error:

MyBB has experienced an internal error and cannot continue.

Error Type:
    (8192)
Error Message:
    Function set_magic_quotes_runtime() is deprecated
Location:
    File: inc/class_core.php
    Line: 163
Code:
    160.             $this->strip_slashes_array($_GET);
    161.             $this->strip_slashes_array($_COOKIE);
    162.         }
    163.         set_magic_quotes_runtime(0);
    164.         @ini_set("magic_quotes_gpc", 0);
    165.         @ini_set("magic_quotes_runtime", 0); 
    166. 

I updated my forum three days ago.

thanks
It's because your server/host is now running PHP 5.3. magic_quotes is deprecated, so, in class_core.php, find:

		// Determine Magic Quotes Status
		if(get_magic_quotes_gpc())
		{
			$this->magicquotes = 1;
			$this->strip_slashes_array($_POST);
			$this->strip_slashes_array($_GET);
			$this->strip_slashes_array($_COOKIE);
		}
		set_magic_quotes_runtime(0);
		@ini_set("magic_quotes_gpc", 0);
		@ini_set("magic_quotes_runtime", 0); 

and change it to:

// Determine Magic Quotes Status
if(version_compare(PHP_VERSION, '5.3' '<'))
{
	if(get_magic_quotes_gpc())
	{
		$this->magicquotes = 1;
		$this->strip_slashes_array($_POST);
		$this->strip_slashes_array($_GET);
		$this->strip_slashes_array($_COOKIE);
	}
	set_magic_quotes_runtime(0);
	@ini_set("magic_quotes_gpc", 0);
	@ini_set("magic_quotes_runtime", 0);
}
You'll also receive an error when trying to edit templates. In ./admin/modules/style/templates.php, find:

	$diff = &new Text_Diff('auto', array($template1['template'], $template2['template']));
	$renderer = &new Text_Diff_Renderer_inline();

And replace it with

	$diff = new Text_Diff('auto', array($template1['template'], $template2['template']));
	$renderer = new Text_Diff_Renderer_inline();

Our SQA team are fully testing MyBB to make sure that it can work on PHP 5.3.0.
Hi Tomm M,

thanks for quickly support.There is no Error but i cannot call my forum.

site:mycode.bplaced.net
Now I see another an error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /users/mycode/www/inc/class_core.php on line 156
(2009-07-03, 01:54 PM)Mycode King Wrote: [ -> ]It's because your server/host is now running PHP 5.3. magic_quotes is deprecated, so, in class_core.php, find:


PHP Code:

// Determine Magic Quotes Status
if(get_magic_quotes_gpc())
{
$this->magicquotes = 1;
$this->strip_slashes_array($_POST);
$this->strip_slashes_array($_GET);
$this->strip_slashes_array($_COOKIE);
}
set_magic_quotes_runtime(0);
@ini_set("magic_quotes_gpc", 0);
@ini_set("magic_quotes_runtime", 0);

and change it to:


PHP Code:

// Determine Magic Quotes Status
if(version_compare(PHP_VERSION, '5.3' '<'))
{
if(get_magic_quotes_gpc())
{
$this->magicquotes = 1;
$this->strip_slashes_array($_POST);
$this->strip_slashes_array($_GET);
$this->strip_slashes_array($_COOKIE);
}

Hello
There is a small wrong in this correction
The first line must be as this :
if(version_compare(PHP_VERSION, '5.3', '<'))
try it
good bye
class_core.php on line 156 ???????

this error comes
What...?? Undecided Are you getting an error on line 156 or getting an error after you make the above changes?? I'm not really sure what the problem is.... try these changes: http://community.mybboard.net/thread-521...#pid372017