Over a million developers have joined DZone.

Compile/Recompile Turck Mmcache

·
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

Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}