Recommended Posts

Compatible with all versions of PHP 4.x.x so far

NOT compatible with PHP 5

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.

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.

Turck MMCache now BEATS Zend Accelerator and all other PHP accelerators in benchmark tests. So it's currently the BEST PHP accelerator around, even against commercial products, despite being free.

Click here for benchmark tests results:

http://turck-mmcache.sourceforge.net/#bench

The instructions in this How-To is a bit different to the official one, because the directories are a bit different - I couldn't get this to work using the instructions from the site itself.

Follow the instructions and you will uninstall PHPA or ZEND, and replace it with Turck MMCache.

Installation:

Upgrade instructions are the same as installation. Note the lines in red which are different to previous instructions.

1) Login as root in SSH

2) Run the following commands in the following order:

cd /

mkdir mmcache

cd mmcache

wget http://unc.dl.sourceforge.net/sourc...he-2.4.6.tar.gz

tar xvzf turck-mmcache-2.4.6.tar.gz

cd turck-mmcache-2.4.6

export PHP_PREFIX="/usr" (OR export PHP_PREFIX="/usr/local" -depending on where PHP is installed)

$PHP_PREFIX/bin/phpize

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

make

make install

3) Edit php.ini - usually it's /etc/php.ini or /usr/local/lib/php.ini

Find this:

;Windows Extensions

Above this, comment out the PHPA or ZEND lines if you have them. Replace them with this:

To install as a ZEND extension:

zend_extension="/mmcache/turck-mmcache-2.4.6/modules/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"

OR to install as a PHP extension:

extension="/mmcache/turck-mmcache-2.4.6/modules/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"

4) Create the cache directory by doing the following at the command line

mkdir /tmp/mmcache

chmod 0777 /tmp/mmcache

5) Restart Apache

service httpd restart

Done!

Copy the mmcache.php file in the mmcache directory to a directory that is web-accessible, and run it.

You should be able to see a list of cached scripts as well as the above information.

Turck MMCache 2.4.6

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

http://www.vbulletin.com/forum/attachment....tachmentid=7291

ALTERNATIVELY, Copy the following code into a file and save it as a PHP file, and run it:

PHP:

<?php

phpinfo();

?>

You should see the following:

This program makes use of the Zend Scripting Language Engine:

Zend Engine v1.3.0, Copyright © 1998-2002 Zend Technologies with Turck MMCache v2.4.6, Copyright © 2002-2003 TurckSoft, St. Petersburg, by Dmitry Stogov

As well as the info shown above.

NOTE: Each time you upgrade PHP, you need to COMPLETELY REINSTALL MMCACHE BY DELETING THE WHOLE MMCACHE DIRECTORY, AND UNTARRING A NEW MMCACHE DIRECTORY!

*** If that doesn't work:

For those who can't seem to be able to recompile MMCache properly (for whatever reason), they should follow the above installation instructions, and try the following alternative commands:

./configure

make distclean

./configure

make

make install

If you have any problems, PM me.

Link to comment
https://www.neowin.net/forum/topic/272030-howto-turckmmcache/
Share on other sites

  • 1 year later...

Hi,

One of my programmers have done a mess, by encoding the php files ...

using PHPCoder (http://phpcoder.shadonet.com) and Turck MMcache (http://www.turcksoft.com/en/e_mmc.htm)

and have deleted the original files.

I am trying to decode those files....

Please check the attachment.... i am not getting the decode properly. would any of you help me please.

Thanks & Regards

Durrani, Mohamed A.

encoded2decodedv1.0.zip

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • So what is it, "Some exciting upgrades happened under the hood, and one of those upgrades is now available to all Windows 11 users." or "Also, you may need to enable it manually, as new features are rolling out gradually. Here is how to do it:" We keep hearing these are rolling out but they never seem to show up, we have force them on with ViVetool. Getting a bit tired of it.
    • Seems very lazy, so basically drain more battery power on laptops/tablets if this is turned on.
    • Edifier's popular R1280Ts bookshelf speaker can be a nice upgrade for your PC desktop audio by Sayan Sen Yesterday we covered a very nice discount on Sony's high-resolution SS-CS5M2 speakers, which are currently on sale for just $178. It packs the rather rare super tweeter that offers an additional level of clarity and "airy"-ness which a tweeter cannot provide. It's a passive speaker though which means it will require external amplification, which will cost extra. Let's say though that you have a budget of under $150 but still want a decent-sounding speaker that's active. The Edifier 1280Ts can help in this regard, as the unit is currently at a decent price of $130 (purchase link under the specs table down below). While you will not get deep sub-bass from the 1280Ts, you should get clearer vocals and highs like cymbals than a cheaper satellite-based 2.1 system. Obviously the soundstage and imaging will also improve due to the better reproduction of highs. As mentioned above, the Edifier R1280Ts is active and so does not need a separate amplifier, as it's a powered system with its own amplification. A great thing about this model is that you can add a separate active subwoofer to it too using the "sub out" option, which essentially acts like an LFE. This way, you can add in the missing deep bass. The technical specifications of the Edifier R1280Ts are given in the table below: Specification Value Total Output Power 42W RMS (21W + 21W) Driver Units 4-inch mid-range/bass driver + 0.5-inch silk diaphragm treble driver Frequency Response 52Hz – 20kHz Signal-to-Noise Ratio (SNR) ≥85dBA Input Sensitivity Line In1: R/L: 500±50mV Line In2: R/L: 700±50mV Inputs Dual RCA inputs Outputs Sub Out port for external subwoofer Get it at the link below: Edifier R1280Ts Powered Bookshelf Speakers - 2.0 Stereo Active Near Field Monitors with Subwoofer Line Out: $129.99 (Sold by Edifier Online Store, Shipped by Amazon US) This Amazon deal is US-specific and not available in other regions unless specified. This is a first-party seller link (at the time of article publishing); ensure that you also purchase from a first-party seller link only. If you don't like it or want to look at more options, check out the previous deals that we have covered, OR you can also visit Amazon US deals page. Get Prime (SNAP), Prime Video, Audible Plus or Kindle / Music Unlimited. Free for 30 days. As an Amazon Associate, we earn from qualifying purchases.
    • Appreciate the focus on UI performance, but this is going the wrong way. Instead of optimizing performance, coding to lower latency, etc. this is just throwing horsepower. This is lazy.
  • Recent Achievements

    • Week One Done
      FBSPL earned a badge
      Week One Done
    • One Year In
      Jim Dugan earned a badge
      One Year In
    • One Month Later
      Tommi118 earned a badge
      One Month Later
    • One Month Later
      sjbousquet earned a badge
      One Month Later
    • Week One Done
      sjbousquet earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      489
    2. 2
      PsYcHoKiLLa
      197
    3. 3
      +Edouard
      155
    4. 4
      Steven P.
      84
    5. 5
      ATLien_0
      69
  • Tell a friend

    Love Neowin? Tell a friend!