I've set magic_quotes_gpc = Off
in php.ini
,but I see it's still On
in phpinfo();
views:
97answers:
3First of all, you must be sure you modified the right php.ini
file : there can be many files called php.ini
-- and only one is "the right one".
You can see which php.ini
file is used in the output of phpinfo()
: there should be an entry called Configuration File (php.ini) Path
that indicates the directory in which php.ini
is looked for, and an entry called Loaded Configuration File
that indicates the full path+name of the php.ini
file that's used.
Then : don't forget to restart the webserver, so the modifications to php.ini
are taken into account (Not sure that's necessary with IIS, but as it's required with Apache, I suppose it cannot hurt with IIS)
If that doesn't change a thing : what if you try to modify another directive : is the modification taken into account ?
As an alternative, you can disable it from your script too:
// disable magic_quotes_runtime
if (get_magic_quotes_runtime())
{
@set_magic_quotes_runtime(0);
}
You can check the php.ini file that was loaded via the php_ini_loaded_file function. Restart your web server.