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.

memcache extension disabled when php.ini in public_html

Discussion in 'General Discussion' started by iddy, Sep 15, 2012.

  1. iddy

    iddy Member

    Joined:
    Jul 27, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi

    I'm new to cpanel and whm. I asked my hosting company to install Memcached on my vps server and they also installed the PHP memcache extension.

    For one account the memcache extension is somehow being disabled when the php.ini file is present in the public_html directory.

    Unfortunately if i delete the php.ini file the installation of opencart that i have doesnt display.

    Can anyone tell me how to resolve this (i have ssh access but don't understand how to use it)

    My php.ini file is as follows (just in case it matters)
    Code:
    magic_quotes_gpc = Off;
    register_globals = Off;
    default_charset	= UTF-8;
    memory_limit = 64M;
    max_execution_time = 18000;
    upload_max_filesize = 999M;
    safe_mode = Off;
    mysql.connect_timeout = 20;
    session.use_cookies = On;
    session.use_trans_sid = Off;
    session.gc_maxlifetime = 12000000;
    allow_url_fopen = on;
    ;display_errors = 1;
    ;error_reporting = E_ALL;
    
    Thanks
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Please try copying the default php.ini file on your system to the public_html directory. EX:

    Code:
    # cp /usr/local/lib/php.ini /home/username/public_html/
    Then, modify "/home/username/public_html/php.ini" so that your custom configuration values are applied without removing the other entries in the file.

    Thank you.
     
  3. iddy

    iddy Member

    Joined:
    Jul 27, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Thanks for the suggestion.

    I modified the default php.ini with the opencart php.ini values (and put the file into public_html) but the site still will not display with the new php.ini file.
    I've listed the default entries below (with the corresponding opencart ones)
    I'd appreciate if you could take a look and tell me which (if any) i can/should ignore e.g. session.use_cookies is set to 1 in default but On in opencart.

    I'm assuming that the conflict is between the opencart values and the corresponding default values but I can post the complete default php.ini file if needed.

    Thanks


    Code:
    
    default php.ini entries   ------->  public_html (opencart) php.ini entries
    
    ;magic_quotes_gpc = Off   ------>    magic_quotes_gpc = Off;
    ;register_globals = Off   ------>      register_globals = Off;
    ;default_charset = "iso-8859-1"  ------>      default_charset	= UTF-8;
    memory_limit = 512M   ------>      memory_limit = 64M;
    max_execution_time = 300   ------>     max_execution_time = 18000;
    upload_max_filesize = 128M    ------>     upload_max_filesize = 999M;
    ;safe_mode = Off                 ------>     safe_mode = Off;
    mysql.connect_timeout = 60  ------>     mysql.connect_timeout = 20;
    session.use_cookies = 1        ------>     session.use_cookies = On;
    session.use_trans_sid = 0       ------>     session.use_trans_sid = Off;
    session.gc_maxlifetime = 1440    ------>     session.gc_maxlifetime = 12000000;
    allow_url_fopen = On            ------>      allow_url_fopen = on;
    display_errors = On              ------>     ;display_errors = 1;
    error_reporting  =  E_ALL & ~E_NOTICE  ------>     ;error_reporting = E_ALL;
    
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Please add a txt file or link to it for the complete php.ini file you are using on that account. It would have need to have been copied from /usr/local/lib/php.ini and the values changes as Michael already noted, although given what you've said, you've likely done that.
     
  5. iddy

    iddy Member

    Joined:
    Jul 27, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Here are the original file (copied from the server) and the file with the modifications I've made.
     

    Attached Files:

  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Based on the files, I'm not entirely certain why it isn't being detected. Even though it's a custom extension, we should still be able to investigate why an extension isn't being detected on an individual php.ini file. As such, please submit a ticket for us to check into this further. Tickets can be submitted via WHM > Support Center > Contact cPanel or using the link in my signature. For tracking purposes, please post the ticket number here afterward. Thanks!
     
  7. iddy

    iddy Member

    Joined:
    Jul 27, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Thanks for checking this out for me. Before I submit a ticket I'll do some more checks. I had memcache installed to run an opencart extension so I'll ask the developer to check it out just in case something is conflicting between the extension and my opencart installation that is causing the issue. I'll open a ticket and post the ticket number here if he cannot find any issue.
    Thanks again for all the help
     
Loading...

Share This Page