Roundcube Community Forum

 

magic_quotes_gpc

Started by ishvir, March 25, 2008, 09:19:54 AM

Previous topic - Next topic

_ASH_

Fantastic... This worked for me...

Thanks

ASH

jak119

Quote from: yourregistrationisbroken;13392Add this to the top of index.php


if (get_magic_quotes_gpc() ) {
    
$stripquotes create_function('&$data, $self',
          
'if (is_array($data)) foreach ($data as $k=>$v) $self($data[$k], $self); '.
          
'else $data = stripslashes($data);');
    
$stripquotes($_POST,$stripquotes);
    
$stripquotes($_GET,$stripquotes);
    
$stripquotes($_COOKIE,$stripquotes);
}


Then change value of magic_quotes_gpc to 1 in the installer/check.php


$ini_checks 
= array('file_uploads' => 1'session.auto_start' => 0,
    
'magic_quotes_gpc' => 1'magic_quotes_sybase' => 0);


Then remove the strip_slashes command from program/include/main.inc (line 503)



  
// strip slashes if magic_quotes enabled
//  if ((bool)get_magic_quotes_gpc())
//    $value = stripslashes($value);

Sorry for the delay, I thought I'd subscribed to this thread but apparently not but thanks to Google I found this again. Thank you so much! That did in fact solve my problem, I think yourregistrationisbroken may in fact be my new favorite person for the time being :).