Cheap Web Hosting Directory - Find Cheap Web Hosting Companies
HomeHosting ArticlesHosting GlossaryLinks
SPONSORED LINK
StartLogic
StartLogic - Affordable Webhosting
  • FREE Domain Name
  • 30 day Money Back Guarantee
  • FREE Web Builder
  • HOSTING CATEGORIES
    ASP/ASP.NET Hosting
    Dedicated Hosting
    E-Commerce Hosting
    JSP Hosting
    Low cost Hosting
    Managed Hosting
    PHP Hosting
    Reseller Hosting
    Unix/Linux Hosting
    Window Hosting
    SITE NAVIGATION
    Hosting Articles
    Web Links
    OUR PARTNERS
    Newport Web Design
    Cheap Web Hosting





    Website Source

    How To Install Turck MMCache

    Turck MMCache is a free open source PHP accelerator, optimizer, encoder and dynamic content cache for PHP. It increases performance of PHP scripts by caching them in compiled state, so that the overhead of compiling is almost completely eliminated. Also it uses some optimizations to speed up execution of PHP scripts. Turck MMCache typically reduces server load and increases the speed of your PHP code by 1-10 times.

    Turck MMCache stores compiled PHP scripts in shared memory and execute code directly from it. It creates locks only for short time while search compiled PHP script in the cache, so one script can be executed simultaneously by several engines. MM shared memory library (http://www.engelschall.com/sw/mm/) was used by Turck MMCache before version 2.3.13 for management of shared memory and locking. Files those can't fit in shared memory are cached on disk only. Turck MMCache was first launched in 2001 to speed up the www.guestbooks4all.com service. It has been tested under PHP 4.1.0-4.3.3 under GNU/Linux and Windows with Apache 1,3 and 2.0. Patches for ports to other OSs and PHP versions are welcome

    Since version 2.3.10, Turck MMCache contains a PHP encoder and loader. You can encode PHP scripts using encoder.php in order to distribute them without sources. Encoded files can be run on any site which runs PHP with Turck MMCache 2.3.10 or above. The sources of encoded scripts can't be restored because they are stored in a compiled form and the encoded version doesn't contain the source. Of course, some internals of the scripts can be restored with different reverse engineering tools (disassemblers, debuggers, etc), but it is not trivial.

    Since version 2.3.15, Turck MMCache is compatible with Zend Optimizer's loader. Zend Optimizer must be installed after Turck MMCache in php.ini. If you don't use scripts encoded with Zend Encoder then we do not recommend you install Zend Optimizer with Turck MMCache.

    Turck MMCache does not work in CGI mode.

    1. Login to your server as root via SSH

    2. Type: cd /

    3. Type: mkdir mmcache

    4. Type: cd mmcache

    5. Type: wget http://unc.dl.sourceforge.net/source...e-2.4.6.tar.gz

    6. Type: tar -xvzf turck-mmcache-2.4.6.tar.gz

    7. Type: cd turck-mmcache-2.4.6

    8. Type: export PHP_PREFIX="/usr" OR export PHP_PREFIX="/usr/local" This depends on where PHP is installed

    9. Type: $PHP_PREFIX/bin/phpize

    10. Type: ./configure --enable-mmcache=shared --with-php-config=$PHP_PREFIX/bin/php-config

    11. Type: make

    12. Type: make install

    13. Edit PHP.INI File (One of the below will work - if one is emtpy then use the other file) Type: pico -w /etc/php.ini or Type: pico -w /usr/local/lib/php.ini

    14. Find this:

    ;Windows Extensions

    Above this line comment out the PHPA or the ZEND lines if they are there. Replace them with the following:

    For ZEND: zend_extension="/mmcache/turck-mmcache-2.4.6/modules/mmcache.so" mmcache.shm_size="16" #^-This is the folder limit (16mb), you can make it larger if you wish. mmcache.cache_dir="/home/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"

    OR for PHP Extensions extension="/mmcache/turck-mmcache-2.4.6/modules/mmcache.so" mmcache.shm_size="16" mmcache.cache_dir="/home/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"

    15. Now we need to create a cache directory.

    16. Type: mkdir /home/mmcache

    17. Type: chmod 0777 /home/mmcache

    18. Restart Apache Type: service httpd restart

    19. Done - A list of supported scripts. MMCache support enabled Caching Enabled true Optimizer Enabled true Memory Size 33,554,392 Bytes Memory Available 23,737,176 Bytes Memory Allocated 9,817,216 Bytes Cached Scripts 110 Removed Scripts 0 Cached Keys 0

    When you upgrade PHP you need to completely re-install MMCache. You need to delete the whole directory, and re-install.

    Author: Web Hosting UK (http://www.session9.co.uk/ )

    Webmaster Forums ( http://www.ukwebmasterforums.com/ )

    Web Hosting Affiliate ( http://www.session9.co.uk/web-hosting-affiliate/ )

    Back
    OUR SPONSORS 





    PowWeb Hosting - $7.77/month!

    Bluehost Web Hosting $6.95

    Buy web hosting from 1&1-Get $600 in FREE sofware



    OUR PARTNERS
    Web Hosting Resource
    Programming Tutorials
    -Your Link Here


    Unix/Linux Hosting  •  Low cost Hosting  •  PHP Hosting  •  ASP/ASP.NET Hosting  •  Dedicated Hosting  •  Window Hosting  •  JSP Hosting  •  Reseller Hosting  •  E-Commerce Hosting  •  Managed Hosting
    Copyright @ 2000-2007 www.aBetterWebHost.com

    Partners: Partners Directory | Cisco Discussion Forum