How To Install Turck MMCache



Learn Web Hosting Help and Information on mps-web-hosting.com. How To Install Turck MMCache article will help answer your questions on Web Hosting Help and Information.We at mps-web-hosting.com specialize in Web Hosting Help and Information. Web Hosting Help and Information at mps-web-hosting.com provides the most up to date news and articles. If you have questions please do not hesitate to contact us.

What is 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.

Original: http://www.ukwebmasterforums.com/t4905-how-to-install-turck-mmcache.html

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/ )

Domain Reseller ( http://www.domainvendor.co.uk/ )




Bird Flu - Help Protecting Your Family. - New eBook provides help for the developing pandemic. No installation and you turn the pages like a book on your monitor.
Secrets Of A Professional Installer. - Car stereo installation guide from a pro! Over 150 pgs!

CyberHostPro is a European hosting company that offers several different levels of hosting plans. For this review, we’ll be taking a look at their Windows platform hosting packages, to see how they stack up to the competition. Please keep in mind that all prices quoted from this company are in Euros, and you should check [...]


Article Index: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31


More Articles:


1. Choosing the Right Web Host By Kevin Allman
So you’ve decided about your website design and now you are ready to have your website hosted!When choosing the right web host, they are several factors to consider:I. How often is the web server up? II. Does the server provide SSL? III. Does the server provide for server side scripting? (e.g PHP, ASP?) IV. Free or paid? V. What is the upload limit? What is the file limit? VI. Customer support? VII. Suggestions Appendix A - Web host provider reviews--------------------------------------------…

2. Important considerations before choosing a web hosting provider
The first thing before choosing a web host is that you should be fully aware of your hosting requirements. If you are a beginner wanting to host a personal web site, then your only concern is that you get a decent amount of disk space for your web site with a host that is as cheap as $5 per month. However, if you are a developer, an online entrepreneur or an online business looking for e-commerce capabilities or advanced scripting technologies, then you can determine your requirements in the fol…

3. Tips on Finding a Hosting Service for Your Business Website By Yvette McGovern
There are so many hosting companies offering to host your website for you that the choice may seem a little bewildering. If you are determined about having a successful internet business then you need to consider seriously which hosting company you are going to use for your website. It is almost expected nowadays that a company should have its own website, no matter how basic, and web site hosting has become an exceedingly competitive area. That is good news for any website owner because the a…

4. What Is Web Hosting?
What Is Web Hosting? by Sean FelkerWhat is web hosting?The best way to explain this is by comparing it to a real-life (brick & mortar) situation. Picture a web hosting company as the owner of a shopping mall. The shopping mall owner invested a lot of money on hiring architects, constructors, engineers, etc. to build it. Now all the stores on it are empty and the owner is going to rent them to smaller businesses that can't afford (or who simply don't want) their own building.As a small business o…