On 23 Jan 2006, at 14:50, Marcel Bueno wrote:
----- Original Message ----- From: "Marcel Bueno"
marcel@bueno.com.br To: "Jon Daley" roundcube@jon.limedaley.com Sent: Monday, January 23, 2006 12:50 PM Subject: Re: [RoundCube Dev] Escaped characters(http://www.olate.co.uk/forums/index.php?showtopic=956)
Ow. Excuse-me, I didn't know that ! Php can be configured to
disallow ini_set ! If a server is configured to disallow the .htaccess too (and can
be configured to do this), it's impossible to disable magic_quotes !In this case, how to process ? Do someone know a method to test if
a php alloow a ini_set or not ? I believe that it can be tested.
Is accept, do, else, do nothing or try to do with .htaccess. [...] Someone have another idea ???
I can see two ways to get around this :-
will tell you if magic quotes are on or off so something like
function magic_unquote($str) { if(get_magic_quotes_runtime())
{ return stripslashes($str) } else { return $str; } } // untested
may work.
To tell if PHP will allow ini_set you could try function_exists
('ini_set') to see if the function is available. I'm not sure if this
will always work though.
Yours, Craig -- Craig Webster | t: +44 (0)131 516 8595 | e: craig@xeriom.net Xeriom.NET | f: +44 (0)131 661 0689 | w: http://xeriom.net