Skip to main content

How magic_quotes_gpc turn off

Comments

8 comments

  • Infopro
    Home " Service Configuration " PHP Configuration Editor, Advanced Mode. You'll find it there.
    0
  • cPanelMichael
    Hello, Please keep in mind the magic quotes feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0:
    0
  • SteveHE
    Hi. Just to say that magic_quotes_gpc isn't there to switch on/off! See image below. Any help appreciated as I want to switch it off. Thanks.
    0
  • Infopro
    Did you note the post just above yours here?
    magic quotes feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0:

    0
  • SteveHE
    Yes I did. However when running phpinfo for php 5.3.29 it says magic_quotes_gpc is ON. So there's something going on somewhere!
    0
  • David P. Levey Jr.
    Hey SteveHE, You should be able to disable it from the PHP ini file. The ini configuration file is typically located here: /usr/local/lib/php.ini although you can confirm via the command line:
    # php --ini Configuration File (php.ini) Path: /usr/local/lib Loaded Configuration File: /usr/local/lib/php.ini Scan for additional .ini files in: (none) Additional .ini files parsed: (none)
    Find the line with 'magic_quotes_gpc' in the ini file. If there isn't one, try adding this to the end:
    magic_quotes_gpc = off
    Once you save that change, make sure you restart apache.
    # /scripts/restartsrv_apache
    Try that out and let me know the results.
    0
  • SteveHE
    Thanks David. I've done what you suggest and that seems to be working fine with no apparent consequences! We're monitoring it in case there's some code that falls down because of it, but so far so good. Thanks again!
    0
  • David P. Levey Jr.
    Thanks David. I've done what you suggest and that seems to be working fine with no apparent consequences! [...]

    Awesome! Glad to hear it.
    0

Please sign in to leave a comment.