memcache extension disabled when php.ini in public_html

iddy

Member
Jul 27, 2012
5
0
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
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.
 

iddy

Member
Jul 27, 2012
5
0
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;
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
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.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
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!
 

iddy

Member
Jul 27, 2012
5
0
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