Roundcube Community Forum

Release Support => Pending Issues => Topic started by: jarred89 on August 19, 2008, 07:44:18 AM

Title: magic_quotes_gpc
Post by: jarred89 on August 19, 2008, 07:44:18 AM
Hello,

I am installing Roundcube and i am in the install process and it comes up with:

magic_quotes_gpc:  NOT OK(is '1', should be '0')

But I have no idea how to fix it.. Is someone able to help me fix this?

Thanks,
Jarred
Title: magic_quotes_gpc
Post by: bpat1434 on August 19, 2008, 11:24:36 PM
This is a php.ini setting.  It should be set to "0" (that's a zero).

If you can't get to php.ini, you could at the top of index.php (and I believe install.php) add this:
ini_set('magic_quotes_gpc', 0);
Title: magic_quotes_gpc
Post by: jarred89 on August 20, 2008, 12:00:32 AM
Quote from: bpat1434;13395This is a php.ini setting.  It should be set to "0" (that's a zero).

If you can't get to php.ini, you could at the top of index.php (and I believe install.php) add this:
ini_set('magic_quotes_gpc', 0);

Where is the php.ini setting, where can i find it?
Because I added that script to those pages and does not work...
Title: magic_quotes_gpc
Post by: jarred89 on August 21, 2008, 05:21:14 AM
I have contacted my hosting company and got them to turn it off... But it still comes up, So what do I do now?
Title: magic_quotes_gpc
Post by: Chimpie on August 23, 2008, 10:08:13 PM
I'm going to bump this thread cause I'm having the same issue.

I've done a search and read through all of the recommendations and I'm still not getting it work right.

I've created a ticket w/ HostGator to see if they have any suggestions.

Thoughts?

Edit/Update: I contacted HG and they created the php.ini file for me.
Title: magic_quotes_gpc
Post by: astrosmf on August 24, 2008, 12:51:39 AM
i had the same problems and this is what i did to fix it... let me know if this works for you...

in index.php... find...
ADD after
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);
}

in installer/check.php... find
$ini_checks = array('file_uploads' => 1, 'session.auto_start' => 0,
    'magic_quotes_gpc' => 0, 'magic_quotes_sybase' => 0);
REPLACE with
$ini_checks = array('file_uploads' => 1, 'session.auto_start' => 0,
    'magic_quotes_gpc' => 1, 'magic_quotes_sybase' => 0);

in installer/check.php... find
  // strip slashes if magic_quotes enabled
//  if ((bool)get_magic_quotes_gpc())
//    $value = stripslashes($value);
REPLACE with
  // strip slashes if magic_quotes enabled
if ((bool)get_magic_quotes_gpc())
$value = stripslashes($value);