DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Compile/Recompile Turck Mmcache

10.30.2008
| 2426 views |
  • submit to reddit
        This is old but someone with an old server might need it

Step 1. Compiling Turck MMCache (
 run "make clean" first if recompiling
 export PHP_PREFIX="/usr"
 $PHP_PREFIX/bin/phpize
 ./configure --enable-mmcache=shared --with-php-config=$PHP_PREFIX/bin/php-config
 make

You must specify the real prefix where PHP is installed in the "export" command. It may
be "/usr" "/usr/local", or something else.

Step 2. Installing Turck MMCache
 make install

Step 2a. 
root@s2 [~/trungson/turck-mmcache-2.4.6]# make install
Installing shared extensions:   /usr/lib/php/extensions/no-debug-non-zts-20020429/

Need to copy it to the lib folder
cp mmcache.so /usr/lib/php4/mmcache.so

Step 3. Configuring Turck MMCache
Turck MMCache can be installed both as Zend or PHP extension, so you need to edit your
php.ini file (usually /etc/php.ini).
To install as Zend extension:
 zend_extension="/usr/lib/php4/mmcache.so"
 mmcache.shm_size="16"
 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="1"

Step 4. Creating cache directory

 mkdir /tmp/mmcache
 chmod 0777 /tmp/mmcache