HowTo: Install Turck MMCache

nothing unstable about, if anything should be more stable since its patched up some bugs.
 
Hi !
System: FreeBSD 4.10

Problem:
server# ./configure --enable-mmcache=shared --with-php-config=/usr/local/bin/php-config
checking build system type... i386-unknown-freebsd4.10
checking host system type... i386-unknown-freebsd4.10
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... yes
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/Zend -I/usr/local/include/php/TSRM
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20020429
checking for [...]
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
./ltconfig: ./ltconfig: No such file or directory
configure: error: libtool configure failed

I must change something??
 
I couldnt get turk mmcache to install on freebsd but eacellerator installs fine.
 
It worked i just recompiled apache and php and i also redid the same steps to install mmtrunk but it isn't working the mmtruck.php file say;s now nothing installed

Code:
turck-mmcache-2.4.6

export PHP_PREFIX="/usr/local"

$PHP_PREFIX/bin/phpize
./configure --enable-mmcache=shared --with-php-config=$PHP_PREFIX/bin/php-config
make
make install

nano /usr/local/lib/php.ini
set extension_dir to /usr/local/lib/php/extensions/no-debug-non-zts-20020429/


Add this at the bottom

extension="mmcache.so"
mmcache.shm_size="32"
mmcache.cache_dir="/tmp/mmcache"
mmcache.enable="1"
mmcache.optimizer="1"
mmcache.check_mtime="1"
mmcache.debug="0"
mmcache.filter=""
mmcache.shm_max="0"
mmcache.shm_ttl="0"
mmcache.shm_prune_period="0"
mmcache.shm_only="0"
mmcache.compress="0"
 
you realise eaccellerator replaces mmcache which is now a long time dead project.
 
What does memory size do? I have a PHP heavy server, with a few thousand scripts, and this memory gets filled up to 16MB after about 30 seconds. Any guidelines on what size this should be, or how this affects performance?

I don't know exactly how eAccelerator works, but looking at my PHP scripts, and the size of output they generate, I would probably think that eAccelerator's cache should be closer to 16GB than 16MB, if all PHP scripts are to be cached.
 
Last edited:
I have struggled with this for ages now. Both turck-mmcache and eAccelerator segfaults approx. twice a day. Here's the error from httpd/error_log:
[Sat Jan 21 10:35:17 2006] [notice] child pid 27390 exit signal Segmentation fault (11)
This happens both with turck and eAccelerator, using PHP 4.3.10 and Apache 1.3.33, and older versions.

Does anyone know why this segfaults? I am using the default values for eAccelerator in php.ini.

Anyone suggest I should disable Zend?
 
Sorry for using a post replying to myself. But if anyone wonders, I'm using the following settings for my php.ini and it seems to be working well. I think the problem might have been that the cache filled up quickly and old files were not removed. I have a good few thousand PHP scripts on the server, and they're quite heavy.

Here are the settings I'm using:
zend_extension="/root/eaccelerator-0.9.3/modules/eaccelerator.so"
eaccelerator.shm_size="64"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="4M"
eaccelerator.shm_ttl="1800"
eaccelerator.shm_prune_period="1800"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
 
running php 4.4.2 with mmcache 2.4.6 installed, no probs whatsoever.
Just recompiled everything, and added the settings to php.ini again.
 
Back
Top