Still getting error even with "magic_quotes_gpc" set to off

9 posts by 3 authors in: Forums > CMS Builder
Last Post: January 25, 2008   (RSS)

By rasbro - January 23, 2008

Up until now, when I have updated the php.ini file to have "magic_quotes_gpc" set to off, I have not had any problems. But now I am getting the "Please disable the 'magic_quotes_gpc'..." error, even though the php.ini file has it set to off AND the .htaccess file has the following command:
<IfModule mod_php5.c>
# php_flag magic_quotes_gpc Off
</IfModule>

Any suggestions? The only change made recently that I can think of is a change from using PHP 5.2 to Fast CGI PHP 5.2.

Thanks,
Brian

Re: [rasbro] Still getting error even with "magic_quotes_gpc" set to off

By Dave - January 23, 2008

The latest version (v1.08) no longer required magic_quotes_gpc to be disabled. So I imagine you're running an earlier version? Here's some options:

You could upgrade to v1.08, or you could...

Confirm that magic_quotes_gpc is disabled by running a phpinfo.php script and searching for "magic_quotes_gpc". Just create a file called "phpinfo.php" with this in it:

<?php print phpinfo(); ?>

If you're sure it's disabled, you can disable that error by editing lib/init.php. Just search for "magic_quotes_gpc" and put a comment # in front of that line to ignore it.

Or you could replace that line with this code from the latest version that disables that 'feature' if it's on.

// undo magic quotes
if (get_magic_quotes_gpc()) { // undo deprecated php magic_quotes feature
$in = array(&$_GET, &$_POST, &$_COOKIE);
while (list($k,$v) = each($in)) {
foreach ($v as $key => $val) {
if (!is_array($val)) {
$in[$k][$key] = stripslashes($val);
continue;
}
$in[] =& $in[$k][$key];
}
}
unset($in);
}


If magic quotes is on you can tell because anytime you enter a character like ' it will save it as \'.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Still getting error even with "magic_quotes_gpc" set to off

By rasbro - January 24, 2008

Yes, I was running 1.07 but have now installed 1.08 and it solved the problem. It was just one of those things where I knew I had disabled the magic_quotes_gpc but it wasn't registering as such.

Thanks a bunch!

Brian

Re: [rasbro] Still getting error even with "magic_quotes_gpc" set to off

Did you have problems switching over to 1.08. I am just wondering due to having live sites and I can't afford to lose anything. Also with my hosting I can turn on and off the magic quotes. Should I turn them off if I can update to the newer version then upload it. Thanks Glenn
Glenn Rauchut (Owner) Emergency Designz

Re: [grauchut] Still getting error even with "magic_quotes_gpc" set to off

By rasbro - January 24, 2008

No, no problem switching over to 1.08. I didn't have a lot to loose since I just started on the site, but it was pretty painless.

Re: [rasbro] Still getting error even with "magic_quotes_gpc" set to off

By grauchut - January 24, 2008 - edited: January 24, 2008

Dave if everything is ok in the tempfolder do I just upload certain parts of the new version.


Also does the new version of tinyMCE 3 have spell check?
Glenn Rauchut (Owner) Emergency Designz

Re: [grauchut] Still getting error even with "magic_quotes_gpc" set to off

By Dave - January 24, 2008

You don't need to upload all the folder, just the ones listed in the upgrade docs:
http://www.interactivetools.com/docs/cmsbuilder/upgrade.html

I think tinyMce does have some spellcheck features and add-ons. We don't have it enabled but you can tweak the tinyMCE config in this file: lib/menus/default/edit_functions.php (just search for "tinyMCE.init").

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Still getting error even with "magic_quotes_gpc" set to off

Thanks I got it to work. I will also make sure to send that email you requested. Thanks Glenn
Glenn Rauchut (Owner) Emergency Designz