Reputation: 63626
I've set magic_quotes_gpc = Off
in php.ini
,but I see it's still On
in phpinfo();
Upvotes: 2
Views: 7143
Reputation: 947
On my installation the c:\php\php.ini file was named php ini
. So phpmyinfo() was not loading it, despite the PATH
environment variable including C:\php\
. (Check this in a DOS prompt with SET PATH
).
So rename it to php.ini
.
It was difficult to spot in Windows Explorer.
Upvotes: 0
Reputation: 38298
You can check the php.ini file that was loaded via the php_ini_loaded_file function. Restart your web server.
Upvotes: 0
Reputation: 382656
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);
}
Upvotes: 0
Reputation: 400932
First 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 ?
Upvotes: 1