MyBB Community Forums

Full Version: Stable PHP 5.3.0 release
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Can php 5.3.0 be used with mybb 1.4.8
Our SQA team is currently in the process of verifying MyBB with PHP 5.3.0, but I personally don't think that you should experience any issues (or significant ones, at the minimum)
(2009-07-01, 03:15 AM)Ryan Gordon Wrote: [ -> ]Our SQA team is currently in the process of verifying MyBB with PHP 5.3.0, but I personally don't think that you should experience any issues (or significant ones, at the minimum)

so if i upgrade the php will i need to make any changes to any of the files i have tryed some of the early 5.3.0 on a test computer fresh install and i had gotten mysql errors will this happen if i upgrade
(2009-07-01, 03:26 AM)Howman Wrote: [ -> ]
(2009-07-01, 03:15 AM)Ryan Gordon Wrote: [ -> ]Our SQA team is currently in the process of verifying MyBB with PHP 5.3.0, but I personally don't think that you should experience any issues (or significant ones, at the minimum)

so if i upgrade the php will i need to make any changes to any of the files i have tryed some of the early 5.3.0 on a test computer fresh install and i had gotten mysql errors will this happen if i upgrade

(2009-07-01, 03:15 AM)Ryan Gordon Wrote: [ -> ]Our SQA team is currently in the process of verifying MyBB with PHP 5.3.0
(2009-07-01, 02:16 AM)Howman Wrote: [ -> ]Can php 5.3.0 be used with mybb 1.4.8
Yes, but you must add a few bug fix to mybb. Firstly, open file /inc/core_class.php. Search line 163. Insert hash sign before this line:
#set_magic_quotes_runtime(0);
This fix biggest problem.
did it work?
(2009-07-09, 06:44 AM)smooch1502 Wrote: [ -> ]did it work?
Yes, partially. Normal user features works OK, but some part of Admin CP doesn't work.
We'll be providing support for PHP 5.3 and 6.0 in 1.4.9 (unless something comes along).

In the mean time, you can do this; in ./inc/class_core.php, replace

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);
}

...with...

if(version_compare(PHP_VERSION, '5.3.0', '<'))
{
	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);
}

In ./admin/modules/style/templates.php, find:

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

Replace it with:

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

If you're installing MyBB, and receive warnings, then at the top of ./install/index.php, replace:

@error_reporting(E_ALL & ~E_NOTICE);

...with...

@error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);

This is only a quick fix. 1.4.9 should be fully compatible with 5.3. If there are any other errors, please report them in the Bug Reports forum.
I found this error:
MyBB Internal Error

MyBB has experienced an internal error and cannot continue.

Error Type:
    (8192)
Error Message:
    Assigning the return value of new by reference is deprecated
Location:
    File: inc/3rdparty/diff/Diff.php
    Line: 53
Backtrace:
    File 	Line 	Function
    /inc/class_error.php 	171 	errorHandler->output_error
    /admin/modules/style/templates.php 	1196 	errorHandler->error
    /admin/modules/style/templates.php 	1196 	require_once
    /admin/index.php 	380 	require
mrl586, if you follow my instructions, then that error won't appear. In particular, the edit needed to ./admin/modules/style/templates.php.

As mentioned, the next maintenance release will be fully compatible with PHP 5.3.
Pages: 1 2