DEBUG - Deprecated: Function Set_magic_quotes_runtime() Is Deprecated


Subject: DEBUG - Deprecated: Function Set_magic_quotes_runtime() Is Deprecated
FIX: Deprecated: Function set_magic_quotes_runtime() is deprecated

OPEN: common.php

SEARCH:
Code: [Download] [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: [Download] [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);
}


:wink:

Inactive User
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: [Download] [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. ;)

Subject: Re: [FIX] Deprecated: Function Set_magic_quotes_runtime() Is Deprecated
Did you check the documentation @ php.net to check this?

Subject: Re: [FIX] Deprecated: Function Set_magic_quotes_runtime() Is Deprecated
I found this: Bug #47857: Deprecated set_magic_quotes_runtime

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..

:mrgreen: :mrgreen:

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.

Inactive User
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: [Download] [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)

Subject: Re: DEBUG - Deprecated: Function Set_magic_quotes_runtime() Is Deprecated
or just replace
Code: [Download] [Hide]
  1. set_magic_quotes_runtime() 
by
Code: [Download] [Hide]
  1. @set_magic_quotes_runtime() 
(if you have to fix it now ...)

Profile PM  

Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.4305s (PHP: 5% SQL: 95%)
SQL queries: 16 - Debug Off - GZIP Enabled