t9clkclnr

Well-Known Member
Jun 11, 2004
254
0
166
Southern California
I've enabled memcache in the easyapache config, and memcache is never compiled into the apache/php build.

Anybody successfully enable memcache support through easyapache??

WHM 11.15.0 cPanel 11.18.1-C21565
CENTOS Enterprise 4.6 i686 on standard - WHM X v3.1.0
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
308
cPanel Access Level
Root Administrator
How are you determining that memcache was not compiled/built ?

Performing a test build and selecting memcache results in the following output from httpd:

Code:
dtest ~ # /usr/local/apache/bin/httpd -l
Compiled in modules:
  core.c
  mod_access.c
  mod_auth.c
  mod_cache.c
  mod_mem_cache.c
....
 

Vinayak

Well-Known Member
Jun 27, 2003
281
2
168
Bharat
cPanel Access Level
Root Administrator
I am facing the same problem of installing memcache on a box, I tried it by

selecting memcache in easyapache, it failed

by using all_php5 at /var/cpanel/easy/apache/rawopts/ with the entry --enable-memcache this also failed

None of the above installed memcache.so for PHP

Finally downloading and building by source, following these steps:

Code:
cd usr/local/src/
wget http://pecl.php.net/get/memcache-3.0.3.tgz
tar xvfz memcache-2.1.0.tar.gz
cd memcache-3.0.3
phpize
./configure
make
make install
Since it installed memcache.so at
/usr/lib/php/extensions/no-debug-zts-20060613

Hence edited /usr/local/lib/php.ini to contain

Code:
extension = /usr/lib/php/extensions/no-debug-zts-20060613/memcache.so
memcache.allow_failover = 0
But that is also not working.

Output from httpd does shows:
Code:
[email protected] [/usr/local/src/memcache-3.0.3]# /usr/local/apache/bin/httpd -l
Compiled in modules:
  core.c
  mod_authn_file.c
  mod_authn_default.c
  mod_authz_host.c
  mod_authz_groupfile.c
  mod_authz_user.c
  mod_authz_default.c
  mod_auth_basic.c
  mod_cache.c
  mod_mem_cache.c
.
.
.
Any idea where things may be going wrong.

My OS, WHM version are:
cPanel 11.24.4-R33609 - WHM 11.24.2 - X 3.9
CENTOS 5.2 x86_64 on standard
 

SB-Nick

Well-Known Member
Aug 26, 2008
175
9
68
cPanel Access Level
Root Administrator
Heya,

There are few tips to troubleshoot this,

- Check easyapache compilation log
- See if typing 'php -v' on the box shows any error
- double check you have Libevent compiled and installed

My best suggestion is to go to your last easyapache log and see wheter is an error or not about memcache module compilation for Apache nor PHP.
 

skorpio3000

Registered
Feb 6, 2010
1
0
51
Guys EasyApache compiles only the memcached module?
Do I have to manually compile/install the memcache deamon?
 

jmginer

Well-Known Member
Jul 26, 2006
138
4
168
Alicante
cPanel Access Level
Root Administrator
I compiled with easyapache ok,
but in httpd.conf i dont find any "if module memcache" or similar,
i want configure the memory size available for memcache but i dont know how to do.
Anybody know how to configure memcache?
I have a site with lot of images and i want cache it? how to configure? thanks!
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator

jmginer

Well-Known Member
Jul 26, 2006
138
4
168
Alicante
cPanel Access Level
Root Administrator

monarobase

Well-Known Member
PartnerNOC
Jan 26, 2010
512
3
68
France
cPanel Access Level
Root Administrator
Hello,

I've been looking into memcached but am concerned about security issues.

On shared hosting servers is it possible to secure memcached enough ?

It's easy to secure memcached from an outside point of view, but what about securing from the inside ?

Obviously you would only cache pages viewed publicly so does it matter if other sites on the same server can access this cache ? These sites would be able to access the web pages after all…

What about resource controlling ? What is the required approach ? I presume you have to set the resource limits per server and not per user.

Finally on suPHP and fastCGI machines, PHP is run with cpanel account user and not the "nobody" user, I presume that this is not a problem with memcached ?

Do some hosts provide memcached on their shared hosting ? Or is it too much of a risk ?