Author Topic: magic_quotes_gpc  (Read 3578 times)

Offline jarred89

  • Jr. Member
  • **
  • Posts: 11
magic_quotes_gpc
« 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

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
magic_quotes_gpc
« Reply #1 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);
 
  

Offline jarred89

  • Jr. Member
  • **
  • Posts: 11
magic_quotes_gpc
« Reply #2 on: August 20, 2008, 12:00:32 AM »
Quote from: bpat1434;13395
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);


Where is the php.ini setting, where can i find it?
Because I added that script to those pages and does not work...

Offline jarred89

  • Jr. Member
  • **
  • Posts: 11
magic_quotes_gpc
« Reply #3 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?

Offline Chimpie

  • Newbie
  • *
  • Posts: 4
magic_quotes_gpc
« Reply #4 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.
« Last Edit: August 23, 2008, 11:12:54 PM by Chimpie »

Offline astrosmf

  • Jr. Member
  • **
  • Posts: 16
magic_quotes_gpc
« Reply #5 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...
<?php
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);