Installing Turck MMCache php accelerator

Turch MMCache

Update: After Apple Security Update 2005-001 it easier to use a pre-compiled version for the new version of php. Download here.

I’ve been struggling with installing the Turck MMCache PHP Accelerator on my Mac OS X Panther Server. After downloading the source here, i tried to do the following from the command prompt:

tar xvzf turck-mmcache-2.4.6.tar.gz export PHPPREFIX=”/usr” $PHPPREFIX/bin/phpize ./configure –enable-mmcache=shared –with-php-config=$PHP_PREFIX/bin/php-config

But I got the error “configure: error: cannot run /bin/sh ./config.sub

So I used Fink and Fink Commander to install libtool,

I then ran the command again: phpize

and the problem was solved, so I run

./configure –enable-mmcache=shared –with-php-config=$PHP_PREFIX/bin/php-config

Then came:

make

and got the error “libtool: ltconfig version ' does not match ltmain.sh version1.3.5′

So I run the command:

/sw/lib/fink/update/ltconfig /sw/lib/fink/update/ltmain.sh make

And that problem solved. So now it’s time to install it:

make install

So far so good.

Now you have to create the temporary directory for mmcache.

mkdir /tmp/mmcache

Then copy the default php.ini file

sudo cp /etc/php.ini.default /etc/php.ini sudo pico /etc/php.ini

And add these line last:

zendextension=”/usr/lib/php/extensions/no-debug-non-zts-20020429/mmcache.so” mmcache.shmsize=”16″ mmcache.cachedir=”/tmp/mmcache” mmcache.enable=”1″ mmcache.optimizer=”1″ mmcache.checkmtime=”1″ mmcache.debug=”0″ mmcache.filter=”" mmcache.shmmax=”0″ mmcache.shmttl=”0″ mmcache.shmpruneperiod=”0″ mmcache.shm_only=”0″ mmcache.compress=”1″

It’s time to restart Apache:

sudo apachectl restart

Copy the file mmcache.php from the directory with Turck MMCache to your homepage folder, and try it out with http://yoursite/mmcache.php

If everything is ok, you should see the settings for mmcache. Success! Now your .php pages should load up to three times faster.

Here you can find some of the info for installing it: phpmac.com article


Related posts:

  1. Piece of crap
  2. Slow Mac OS X Server 10.2.8
  3. Dual layer DVD burner in G4 Quicksilver

3 thoughts on “Installing Turck MMCache php accelerator

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>