Alternative for set_magic_quotes_runtime()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gopu
Forum Newbie
Posts: 2
Joined: Thu Feb 11, 2010 6:07 am

Alternative for set_magic_quotes_runtime()

Post by gopu »

Hello,
The function set_magic_quotes_runtime() is deprecated in PHP 5.3
I tried to look for the replacement of set_magic_quotes_runtime() but did not get.

I appreciate if anyone there can help me getting an alternative for set_magic_quotes_runtime function in PHP.


thanks,
gopu
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Alternative for set_magic_quotes_runtime()

Post by AbraCadaver »

It's deprecated because you shouldn't be using magic_quotes_runtime, it should be off. You should escape your data yourself. Why would you need set_magic_quotes_runtime()?
Last edited by AbraCadaver on Thu Feb 11, 2010 9:49 am, edited 1 time in total.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
gopu
Forum Newbie
Posts: 2
Joined: Thu Feb 11, 2010 6:07 am

Re: Alternative for set_magic_quotes_runtime()

Post by gopu »

thanks...
Actually zFeeder uses this API. Currently I have removed all the references of this API and it did not cause any problem.

zFeeder – Making PHP 5.3 + compatible

I was wondering if it will fail for certain string sequence.

So if I have understood you right, since it should always be off and zFeeder uses this API to make magic quotes off always, so it will always work.

thanks a lot for the quick reply.
Post Reply