Icy Phoenix


Documentation And How To - DEBUG - Deprecated: Function Set_magic_quotes_runtime() Is Deprecated



FedericoBiccheddu [ Fri 14 Aug, 2009 12:05 ]
Post subject: DEBUG - Deprecated: Function Set_magic_quotes_runtime() Is Deprecated
FIX: Deprecated: Function set_magic_quotes_runtime() is deprecated

OPEN: common.php

SEARCH:
Code: [Hide] [Select]
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on' || !function_exists('ini_get'))
{
deregister_globals();
}
define('STRIP', (get_magic_quotes_gpc()) ? true : false);


REPLACE WITH:
Code: [Hide] [Select]
if(version_compare(PHP_VERSION, '5.3.0', '<'))
{
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on' || !function_exists('ini_get'))
{
deregister_globals();
}
define('STRIP', (get_magic_quotes_gpc()) ? true : false);
}




Lopalong [ Fri 14 Aug, 2009 12:30 ]
Post subject: Re: [FIX] Deprecated: Function Set_magic_quotes_runtime() Is Deprecated
I think that fix needs an argument against the latest php where it has been deprecated and not the current version.

Something like:

Code: [Hide] [Select]
if(version_compare(PHP_VERSION, '6.0.0-dev', '<'))
{

Do this > > >

else

set_magic_quotes_runtime(0); // Disable magic_quotes_runtime
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on' || !function_exists('ini_get'))
{
deregister_globals();
}
define('STRIP', (get_magic_quotes_gpc()) ? true : false);
}


Etc, etc...

Something like that.


Mighty Gorgon [ Fri 14 Aug, 2009 14:09 ]
Post subject: Re: [FIX] Deprecated: Function Set_magic_quotes_runtime() Is Deprecated
Did you check the documentation @ php.net to check this?


FedericoBiccheddu [ Fri 14 Aug, 2009 15:34 ]
Post subject: Re: [FIX] Deprecated: Function Set_magic_quotes_runtime() Is Deprecated
I found this: Bug #47857: Deprecated set_magic_quotes_runtime


DWho [ Fri 14 Aug, 2009 17:40 ]
Post subject: Re: [FIX] Deprecated: Function Set_magic_quotes_runtime() Is Deprecated
thanks for that iknow so one else was having this problem on local i will direct them to this post..



Mighty Gorgon [ Wed 19 Aug, 2009 10:52 ]
Post subject: Re: [FIX] Deprecated: Function Set_magic_quotes_runtime() Is Deprecated
I have to check this...

I will move to Docs in the meantime.

Thanks for sharing.


Lopalong [ Tue 27 Oct, 2009 09:11 ]
Post subject: Re: DEBUG - Deprecated: Function Set_magic_quotes_runtime() Is Deprecated
Yep, I can confirm that I just upgraded xampp which has PHP Version 5.3.0 and I got a whole lot of deprecated error messages generated from common.php along with the usual header warning stuff.


Code: [Hide] [Select]
Deprecated: Function set_magic_quotes_runtime() is deprecated in I:\xampp\htdocs\ip3\common.php on line 135
[Icy Phoenix Debug] PHP Notice: in file /includes/page_header.php on line 1192: Cannot modify header information - headers already sent by (output started at /common.php:135)
[Icy Phoenix Debug] PHP Notice: in file /includes/page_header.php on line 1198: Cannot modify header information - headers already sent by (output started at /common.php:135)
[Icy Phoenix Debug] PHP Notice: in file /includes/page_header.php on line 1199: Cannot modify header information - headers already sent by (output started at /common.php:135)


Informpro [ Tue 27 Oct, 2009 12:16 ]
Post subject: Re: DEBUG - Deprecated: Function Set_magic_quotes_runtime() Is Deprecated
or just replace
Code: [Hide]
  1. set_magic_quotes_runtime() 
by
Code: [Hide]
  1. @set_magic_quotes_runtime() 
(if you have to fix it now ...)




Powered by Icy Phoenix