Jump to content

Recommended Posts

I've tried everything I can think of to get rid of magic_quotes_gpc, but no matter what I do, it won't shut off

  • I've edited the php.ini file that shows as the loaded config in phpinfo(), as well as any others that show up in locate php.ini
  • I've removed all old installations of php
  • I've run sudo grep -rl 'magic_quotes_gpc' /, and not found any more occurrences
  • I've restarted Apache, even gone as far as to reboot the machine
  • But still magic_quotes_gpc stays set to On, both globally and locally
  • Google and the MAMP forums didn't reveal anything particularly insightful or helpful

If I switch versions to 4.4.whatever and restart, phpinfo() shows magic_quotes_gpc Off

 

Anyone got any ideas? I'm fresh out of them, and starting to get a bit annoyed with this nonsense.

 

Mac OS X 10.5.8 PPC

MAMP 1.8.4 stack with Apache 2.0.63, PHP 5.2.11

 

Cut & paste from the loaded php.ini:

; Magic quotes
;

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off

; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off

 

Cut & paste from phpinfo() result:

Directive    Local Value    Master Value
. . . [sNIP] . . .
magic_quotes_gpc    On    On
magic_quotes_runtime    Off    Off
magic_quotes_sybase    Off    Off
. . . [sNIP] . . .

Link to comment
https://forums.phpfreaks.com/topic/223910-magic_quotes_gpc-just-wont-shut-off/
Share on other sites

Does changing any other setting in that php.ini have an affect, such as magic_quotes_runtime ?

 

I would completely retype the magic_quotes_gpc line and try, in turn, 0 (zero) and off (all lowercase) as values. It's acting like it does not see the setting because it thinks something is wrong with the syntax and it is using the default/built-in value.

Good suggestion. No, something is hosed here, evidently. No other changes have any effect. Just noticed my errors aren't being logged anymore, and the logfile's path info isn't showing up in the phpionfo() either. I guess I'll have to go through it line-by-line and look for any syntax problems.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.