The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How magic_quotes_gpc turn off

Discussion in 'General Discussion' started by Giraffex, Mar 18, 2015.

  1. Giraffex

    Giraffex Registered

    Joined:
    Sep 25, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi
    How I can magic_quotes_gpc turn off? I tryed this command in .htaccess
    php_flag magic_quotes_gpc off but it not works.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,451
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Home » Service Configuration » PHP Configuration Editor, Advanced Mode. You'll find it there.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  4. SteveHE

    SteveHE Registered

    Joined:
    Oct 23, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    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. upload_2015-10-23_10-2-8.png
     
    #4 SteveHE, Oct 23, 2015
    Last edited by a moderator: Oct 23, 2015
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,451
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Did you note the post just above yours here?

     
  6. SteveHE

    SteveHE Registered

    Joined:
    Oct 23, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    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!
     
  7. David P. Levey Jr.

    Joined:
    Oct 10, 2015
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Alabama, United States
    cPanel Access Level:
    Root Administrator
    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:

    Code:
    # 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:

    Code:
    magic_quotes_gpc = off
    Once you save that change, make sure you restart apache.

    Code:
    # /scripts/restartsrv_apache
    Try that out and let me know the results.
     
  8. SteveHE

    SteveHE Registered

    Joined:
    Oct 23, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    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!
     
  9. David P. Levey Jr.

    Joined:
    Oct 10, 2015
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Alabama, United States
    cPanel Access Level:
    Root Administrator
    Awesome! Glad to hear it.
     
Loading...

Share This Page