ini_set and magic_quotes_gpc

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

ini_set and magic_quotes_gpc

Post 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?
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post 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.
Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

Post by Ree »

I see now, thanks, that was it.
Post Reply