
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
3 responses so far ↓
1 Marc Worrell // Nov 24, 2004 at 23:46
Thank you so much for sharing this information! You rescued my day and countless hours of fiddling!
Greetings from Amsterdam, Marc
2 Jacken // Nov 24, 2004 at 23:54
Your welcome!
Jacken
You must log in to post a comment.