Hi Carl,

Thanks for your response ! Actually the magic_quotes_gpc cannot be changed
with init_set after 4.2.3 because is a PHP_INI_PERDIR according to this
post
http://stackoverflow.com/questions/517008/how-to-turn-off-magic-quotes-on-shared-hosting
and
php.net . Again on to the same post I found an workaround solution ( PHP 5.3
and above ) and I am posting here for the others to search for this:

if (get_magic_quotes_gpc() === 1)
{
    $_GET = json_decode(stripslashes(json_encode($_GET, JSON_HEX_APOS)),
true);
    $_POST = json_decode(stripslashes(json_encode($_POST, JSON_HEX_APOS)),
true);
    $_COOKIE = json_decode(stripslashes(json_encode($_COOKIE,
JSON_HEX_APOS)), true);
    $_REQUEST = json_decode(stripslashes(json_encode($_REQUEST,
JSON_HEX_APOS)), true);
}

Thanks ! You gave me the idea to place a script @ beginning of *app.php* and
*app_dev.php* ! :)


On Mon, May 2, 2011 at 5:27 PM, Carl <carl.par...@gmail.com> wrote:

> Dang, that's a shame that disabling it in your .htaccess file doesn't do
> the trick. I was hoping it would work since that's the quickest and easiest
> solution without editing php.ini. And it's guaranteed to shut it off.
>
> I assume that your web host can't/won't disable this option on your
> account? If it's shared hosting they generally can't easily disable
> something like that without impacting everyone else on the server. If it
> absolutely cannot be disabled via the php.ini file (for whatever reason),
> then try adding the following to your app.php and app_dev.php files:
>
> ini_set ('magic_quotes_gpc', 0);
>
> Put this on the first line (before any includes) in both of those.
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
<br>
Cezar

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to