views:

97

answers:

3

I've set magic_quotes_gpc = Off in php.ini,but I see it's still On in phpinfo();

A: 

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 ?

Pascal MARTIN
Yes,it's from here:http://222.73.204.65:81/test.php.As for restarting,I just restarted my own site,there are many others hosted in IIS.
I restarted IIS, and it's working now.Why it doesn't work only restarting the **site**?
I suppose you found out : right now, I see `Off` for the `magic_quotes_gpc` directive, in the output of your `phpinfo()` ;-) *(edit : I didn't see your second comment before posting mine)*
Pascal MARTIN
I have no idea what kind of difference there is between a "site" and the whole "server" with IIS, to be honest -- sorry about that.
Pascal MARTIN
I'll regard it as of bug of IIS then..
A: 

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);
}
Sarfraz
A: 

You can check the php.ini file that was loaded via the php_ini_loaded_file function. Restart your web server.

pygorex1