Ezequiel Marquez
Ezequiel Marquez

Reputation: 1147

How do I disable magic_quotes_runtime in PHP 5.5?

I'm trying to migrate a script in php 5.2 to 5.5 that uses set_magic_quotes_runtime() to disable them. I found a hint that suggested I could replace it with:

ini_set ("magic_quotes_runtime", 0); 

Is this correct?

Upvotes: 2

Views: 651

Answers (2)

TML
TML

Reputation: 12966

If you are trying to turn them off, there's nothing to be done - the feature has been removed from PHP entirely since PHP 5.4. There's no need for the line you cited at all in PHP 5.5.

If you are trying to turn them on, you would need to recreate the feature in userland using something like str_replace(); however, I would urge you not to do it.

Upvotes: 2

Brad
Brad

Reputation: 163272

Simply delete the line.

Magic quotes have been dead for some time, and have been removed in PHP 5.4 and later. There is no reason to force them to off when they don't exist.

Upvotes: 5

Related Questions