Hello guys, today when I was try to install Joomla on my server it prevents me from continue because of Magic Quotes GPC = ON , so I red about this and saw many sites and PHP iteself recommended to shut this feature,
my question is in my projects I use function I've created to filter the $_POST variables

function filter($text)
    $text = trim($text);
    $text = strip_tags($text);
    $text = str_ireplace("select","",$text);
    $text = str_ireplace("union", "", $text);
    $text = str_ireplace("update","",$text);
    $text = str_ireplace("insert","",$text);
    $text = str_ireplace("join","",$text);
    $text = str_ireplace("'", "", $text);
    $text = str_ireplace(";", "", $text);
    $text = str_ireplace("$", "", $text);
    $text = str_ireplace("#", "", $text);
    $text = str_ireplace(">", "", $text);
    $text = str_ireplace("<", "", $text);
    $text = str_ireplace("*", "", $text);
    $text = str_ireplace('"', '', $text);
    $text = mysql_real_escape_string($text);
    return $text;


$some_var = filter ($_POST['var']);

if I turned off the Magic Quotes GPC does my project still works ?

4 Years
Discussion Span
Last Post by OsaMasw

but am using 5.3 php version and I can't try because the server contain many scripts on it and are not mine so if somthing happened, I'll be killed :P, and my local server on my PC is 5.2 php version so that why am asking before taking the risk.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.