MyBB Community Forums

Full Version: Mybb and PHP Version 5.3.0
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I don't know where to post this,

I was using php-5.2.8 on my localhost, yesterday I updated it to 5.3.0,
I get this error:


Error Type: 
(8192) 
Error Message: 
Function set_magic_quotes_runtime() is deprecated 
Location:
File: D:\Apache2.2\htdocs\test.com\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. 

Backtrace:
File Line Function 
D:\Apache2.2\htdocs\test.com\inc\class_error.php 171 errorHandler->output_error 
[PHP]   errorHandler->error 
D:\Apache2.2\htdocs\test.com\inc\class_core.php 163 set_magic_quotes_runtime 
D:\Apache2.2\htdocs\test.com\inc\init.php 51 MyBB->MyBB 
D:\Apache2.2\htdocs\test.com\global.php 19 require_once 
D:\Apache2.2\htdocs\test.com\index.php 60 require_once 

Please contact the MyBB Group for support.

I found in php.ini
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off

; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off

I changed these to "On" and restrated appache, same thing.

And any help to know what is the diffrerence between
php 5.3.0 thread safe and nonethread safe versions.

Thanks,
http://community.mybboard.net/thread-521...#pid372017

magic_quotes were depreciated in 5.3.0 so I don't think the php.ini setting would make any difference.
Thanks MattRogowski, sorry I didn't search for it.

Thanks, I will try it... Wink
It works but it is important to set these values in php.ini or you will get white page.

magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off

beside that there is an error in that thread
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); 
}

There is no "}" in the original code - at the end
I tried setting these values to On, I got blank white page,

I changed php.ini and restarted appache --- I tried it now twice.