Compile Turck MMCache with your PHP

Warning: This article/tutorial is more the 45 days old. As such the information contained within could be, by now, out of date. Please read all information to make sure that this article/tutorial will work with your current version of the Operating System

Pre-requisite: You already have Apache and PHP running on your OS X 10.3.3 (Please refer to my previous tutorial)

STEP 1

Download the source of Turck MMCache from:
http://turck-mmcache.sourceforge.net/

STEP2

decompress the source and go to the source path

STEP3

type the following: (assuming you have installed php under /usr/local)

shell> export PHP_PREFIX=”/usr/local” <- or your installed PHP path
shell> $PHP_PREFIX/bin/phpize
shell> ./configure –enable-mmcache=shared –with-php-config=$PHP_PREFIX/bin/php-config

(if configure results in error)

shell> aclocal

and retry STEP3

shell> make
shell> sudo make install

after ‘make install’ you will see something like :
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20020429/

STEP4

add below to the bottom of your php.ini (/usr/local/lib/php.ini)

zend_extension=”/usr/local/lib/php/extensions/no-debug-non-zts-20020429/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″

Please refer to http://turck-mmcache.sourceforge.net/ for information about configuring the options of the Turck MMCache

STEP 5

make directory:

shell> mkdir /tmp/mmcache

 

STEP 6

Restart your apache server

shell> sudo apachectl restart

In your Turck MMCache source directory there should be a file named “mmcache.php”, copy that to your Sites directory:

shell> sudo cp /[turck_mmcache_path]/mmcache.php ~/Sites

Then you should be able to access online mmcache control panel at http://localhost/~[user]/mmcache.php

There are a lot of configuration that you can do with it, please refer to http://turck-mmcache.sourceforge.net/ for details

Leave a Reply

Your email address will not be published. Required fields are marked *