Page 1 of 1

ini_set and magic_quotes_gpc

Posted: Wed Aug 30, 2006 8:43 am
by Ree
When I execute this

Code: Select all

$result = ini_set('magic_quotes_gpc', '1');
var_dump($result);
I get this

Code: Select all

bool(false)
which basicaly means ini_set() failed. I wonder why? I have magic_quotes_gpc set turned off in my php.ini (PHP 5.1.4). Any ideas?

Posted: Wed Aug 30, 2006 8:48 am
by Jenk
magic quotes cannot be altered at runtime, because the operation occurs prior to anything that occurs within your script.

See http://php.net/magic_quotes for more details.

Posted: Wed Aug 30, 2006 8:50 am
by Ree
I see now, thanks, that was it.