My thought was to use this until I do all changes. Once the changes are
done - turn off magic_quote_gpc in php.ini.
but, agree, redo whole site on separate place (under 'new' or on other
box) is much better solution.
-afan
> On Thu, August 10, 2006 7:54 am, [EMAIL PROTECTED] wrote:
>> This is w
On Thu, August 10, 2006 7:54 am, [EMAIL PROTECTED] wrote:
> This is what I found and started to use: created magic_quotes_off.php
>
> if (get_magic_quotes_gpc())
> {
> function stripslashes_deep($value)
> {
> $value = is_array($value) ?
> array_map('str
good idea!
:)
thanks richard!
-afan
> On Wed, August 9, 2006 9:07 am, [EMAIL PROTECTED] wrote:
>> Have a web site on server where magic quote is turned On. Because of
>> problems with quotes within forms, I was thinking to turn it Off. I
>> wonder
>> how much work I'll have to change code to acc
On Wed, August 9, 2006 9:07 am, [EMAIL PROTECTED] wrote:
> Have a web site on server where magic quote is turned On. Because of
> problems with quotes within forms, I was thinking to turn it Off. I
> wonder
> how much work I'll have to change code to accept new setting? Are we
> talking about major
This is what I found and started to use: created magic_quotes_off.php
if (get_magic_quotes_gpc())
{
function stripslashes_deep($value)
{
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
hm. good idea. actually, it's, at least, the most safe way.
:)
thanks.
-afan
> [EMAIL PROTECTED] wrote:
>> Hi to all.
>>
>> Have a web site on server where magic quote is turned On. Because of
>> problems with quotes within forms, I was thinking to turn it Off. I
>> wonder
>> how much work I'll
In case anyone's interested, here's the function I use in the open source
project LOVD to undo Magic Quoting on all GPC arrays:
function lovd_magicUnquote ($var = '')
{
if (!$var) {
if (count($_GET)) {
lovd_magicUnquote(& $_GET);
}
if (count($_POST)) {
Chris wrote:
Chris wrote:
J R wrote:
try to use this few lines of code.
function stripMagicQuotes(&$var)
{
if (get_magic_quotes_gpc()) {
$var= stripslashes($var);
}
return $var;
}
this way you don't really have to worry if magic quotes is on or off.
Then he has to modify
here's an improvement jwith recursion:
function stripMagicQuotes(&$var)
{
if (get_magic_quotes_gpc()) {
if(!is_array($var)) {
$var= stripslashes($var);
} else {
array_walk($var, stripMagicQuotes);
}
}
return $var;
}
hth,
john
On 8/10/06, C
Chris wrote:
J R wrote:
try to use this few lines of code.
function stripMagicQuotes(&$var)
{
if (get_magic_quotes_gpc()) {
$var= stripslashes($var);
}
return $var;
}
this way you don't really have to worry if magic quotes is on or off.
Then he has to modify all the code
J R wrote:
try to use this few lines of code.
function stripMagicQuotes(&$var)
{
if (get_magic_quotes_gpc()) {
$var= stripslashes($var);
}
return $var;
}
this way you don't really have to worry if magic quotes is on or off.
Then he has to modify all the code to call that f
try to use this few lines of code.
function stripMagicQuotes(&$var)
{
if (get_magic_quotes_gpc()) {
$var= stripslashes($var);
}
return $var;
}
this way you don't really have to worry if magic quotes is on or off.
**
On 8/10/06, Chris <[EMAIL PROTECTED]> wrote:
[EMAIL PROTE
[EMAIL PROTECTED] wrote:
Hi to all.
Have a web site on server where magic quote is turned On. Because of
problems with quotes within forms, I was thinking to turn it Off. I wonder
how much work I'll have to change code to accept new setting? Are we
talking about major changes or something that c
13 matches
Mail list logo