Problem with 'magic_quotes_gpc'

Problem with 'magic_quotes_gpc'

by Jeffery Watkins -
Number of replies: 11

I am trying to upgrade and received this message: "The PHP server variable 'magic_quotes_gpc' is not turned On"  I read the documentation but do not understand the override .htaccess part.

 

I do not have access to the php.ini file, can someone explain the work around on this?

 

Thanks,

 

Jeff Watkins

Average of ratings: -
In reply to Jeffery Watkins

Re: Problem with 'magic_quotes_gpc'

by Worth Swearingen -

I have an answer and a problem.  As I understand (and we may find out soon that I don't) you simply need to find the file named "htaccess" in the "lib" subdirectory and copy it to the main moodle directory.  Then, you need to rename it ".htaccess" -- the leading dot is important.

I just completed what I've described and now a bunch of code shows up on the pages.  Also, the magic_quotes error remains.  I tried commenting out the lines in the file that are needed for Apache version 2, but that made no difference.  So, I've reached the end of what I can think of to do.  Help!  The webserver uses Apache 1.3.26 and PHP 4.2.2

Thanks, Worth Swearingen

In reply to Worth Swearingen

Re: Problem with 'magic_quotes_gpc'

by Jeffery Watkins -

Hi Worth,

I tried the same thing before writing in and had the same problem that you describe.  I have put a help request in to my server and hopefully they can alter the php.ini file for me.

 

Thanks for the response. biggrin.gif

 

Jeff Watkins

In reply to Worth Swearingen

Re: Problem with 'magic_quotes_gpc'

by Art Lader -
Hi, Worth,

I do not have the answer, but I know that your account is with Bluedomnio.com. I think they will have to make some adjustments on thier end for you. And it's good to see another Aiken High School teacher has joined the Moodle cult community!
In reply to Art Lader

Re: Problem with 'magic_quotes_gpc'

by Worth Swearingen -

Thanks for pointing me in this direction.  smiley.gif

Worth

In reply to Worth Swearingen

Re: Problem with 'magic_quotes_gpc'

by Art Lader -
Glad to do it. smile

By the way, how did you figure out the problem? Nice job, I am impressed!
In reply to Jeffery Watkins

Aha!

by Worth Swearingen -

I'm most of the way through cracking this nut.

First, I commented out all of the lines except the one that I needed -- the one setting magic_quotes_gpc.  This eliminated the problem of code showing up on the front page.  I'll figure out which line is causing the problem, later.

Second, I changed php_flag to php_value.  Bingo!  Moodle upgraded.

Worth Swearingen

In reply to Worth Swearingen

Re: Aha!

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Well now, that's interesting. Moodle used to recommend php_value until recently, when I switched to php_flag to avoid some other problems that were happening with php_value. Gah! mixed
In reply to Martin Dougiamas

Re: Aha!

by Jeffery Watkins -

You lost me.  How do you "comment out" lines... where do you do this... and what is php_vale and php_flag?

 

Jeff Watkins

In reply to Jeffery Watkins

Re: Aha!

by Worth Swearingen -

Sorry about that!  You'll need to open the htaccess file in a text editor like Notepad.  You'll see inside everything to which I referred.

To comment out a line, just stick a "#" in front of it (skip the quotation marks).  You'll see many instances of this in the htaccess file.  Then, when you scroll down, you'll see a series of directions that begin "php_flag".  Change any of those that you need to "php_value" and leave the rest of the line intact.  I changed magic_quotes_gpc because it was the only setting that needed to be changed.  I commented out the rest instead of deleting them just in case I made a mistake.

Yours,

Worth Swearingen

In reply to Worth Swearingen

Re: Aha!

by Jeffery Watkins -

I was looking at it in Notepad and it all looked like cunieform to me.  I then opened it in Dreamweaver, and low and behold... it read like script.  All fixed and is now working!!!

 

Thanks Worth... you're the man!!

 

Jeff Watkins

In reply to Worth Swearingen

Re: Aha!

by Mark Karnowski -

Worth,

Thanks so much. You're the man!

I use Bluedomino also and they've been telling me that I could change this value to "1' with an .htaccess file, but it wasn't working at all.  Your tip did the trick.

Mark