laborspy

Well-Known Member
Feb 7, 2004
93
0
156
First make sure you do not have versioning compiled into php.


#Download the source package:
#Extract the files & Change to the directory
gunzip -c turck-mmcache-2.4.6.tar.gz | tar xf -
cd mmcache-2.4.6

#Set the variables for the install by typing these commands
export PHP_PREFIX="/usr"
$PHP_PREFIX/bin/phpize
#Install the software & update slocate database
./configure --enable-mmcache=shared --with-php-config=$PHP_PREFIX/bin/php-config
make
make install
updatedb
#Find the correct php.ini file
-Goto a domain that you can visit with a browser (example: cd /home/domain/www)
-type "vi tick.php"
-in the new window insert the following by pressing "i" then "<? phpinfo(); ?>"
-to save press "Esc" and ":wq"
-goto the webpage http://www.domain.com/tick.php
-in the upper section of this website you'll find "Configuration File" write this down.
#Secure mmcache with a username/password
mmcache can be configured via a webpage, for this we must secure it so everyone can't access the page.
php -q /root/turck-mmcache-2.4.6/mmcache_password.php

Enter in your information when prompted.
Changing password for Turck MMCache Web Interface (mmcache.php)

Enter admin name: admin
New admin password: 123
Retype new admin password: 123

It will output the following:

mmcache.admin.name="admin"
mmcache.admin.password="$1$UagbZ7jn$7YApgtNibTW/FQ/idS4g1/"

***PLEASE pick your own personal username/password
#Edit the php.ini file
-type "vi /usr/local/Zend/etc/php.ini" but replace the path with the above path you found
-page to the bottom of this file and first look for "Zend". If is is there make sure you either comment it out or delete it.
-Insert the following into your file:

zend_extension="/usr/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"
mmcache.admin.name="admin"
mmcache.admin.password="$1$UagbZ7jn$7YApgtNibTW/FQ/idS4g1/"

-to save press "Esc" and ":wq"
***The admin name/password is obtained from above.

#Create the tmp and finish up
mkdir /tmp/mmcache
chmod 0777 /tmp/mmcache
service httpd restart
-Now goto your tick.php page and you'll see a new section titled "Turck MMCache"

#To administar the mmcache type
-Goto a domain that you can visit with a browser (example: cd /home/domain/www)
-type "vi cache.php"
-in the new window insert the following by pressing "i" then "<? mmcache(); ?>"
-to save press "Esc" and ":wq"
-goto the webpage http://www.domain.com/cache.php