Exim Extended Logging Published: Jun 03, 2004
  • Rating

    2/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. We sho

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.

Important: If you have ionCube Loader installed this will render it usless and cause all ionCube loader scripts to stop working!

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

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/sourceforge/turck-mmcache/turck-mmcache-2.4.6.tar.gz

tar xvzf turck-mmcache-2.4.6.tar.gz

cd turck-mmcache-2.4.6

export PHP_PREFIX="/usr"
Note: This could also be: export PHP_PREFIX="/usr/local"

$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

You should see the following:

This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies with Turck MMCache v2.4.6, Copyright (c) 2002-2003 TurckSoft, St. Petersburg, by Dmitry Stogov

As well as the info shown above.

  • Rating

    2/5

Related Articles

Comments (17)

  • Gravatar - CHris
    CHris 16:18, June 10, 2004
    I am only new to this but I tried to follow the above instructions but only got the following error after I did, any ideas
    ------------------------------
    root@server1 [/etc]# /etc/init.d/exim restart
    Shutting down exim: [FAILED]
    Shutting down antirelayd: [ OK ]
    Shutting down spamd: [ OK ]
    Starting exim: 2004-06-11 00:11:17 Exim configuration error in line 28 of /etc/exim.conf:
    option setting expected: +address_rewrite
    [FAILED]
    Starting exim-smtps: 2004-06-11 00:11:17 Exim configuration error in line 28 of /etc/exim.conf:
    option setting expected: +address_rewrite
    [FAILED]
    Starting antirelayd: [ OK ]
    Starting spamd: [ OK ]
    root@server1 [/etc]#
    ------------------------------

    thanx
  • Gravatar - Ankur
    Ankur 17:39, June 24, 2004
    Hi Ramprage,<BR><br />
    <BR><br />
    Did you even try these configurations?<BR><br />
    I got the same errors CHris got, but figured out the problem.<BR><br />
    You just need to add a \ with each line in log_selector which makes it:<BR><br />
    <BR><br />
    log_selector = \<BR><br />
    +address_rewrite \<BR><br />
    +all_parents \<BR><br />
    +arguments \<BR><br />
    +connection_reject \<BR><br />
    +delay_delivery \<BR><br />
    +delivery_size \<BR><br />
    +dnslist_defer \<BR><br />
    +incoming_interface \<BR><br />
    +incoming_port \<BR><br />
    +lost_incoming_connection \<BR><br />
    +queue_run \<BR><br />
    +received_sender \<BR><br />
    +received_recipients \<BR><br />
    +retry_defer \<BR><br />
    +sender_on_delivery \<BR><br />
    +size_reject \<BR><br />
    +skip_delivery \<BR><br />
    +smtp_confirmation \<BR><br />
    +smtp_connection \<BR><br />
    +smtp_protocol_error \<BR><br />
    +smtp_syntax_error \<BR><br />
    +subject \<BR><br />
    +tls_cipher \<BR><br />
    +tls_peerdn<BR><br />
    <BR><br />
    But, that apart, even though I have just installed it, I know this is going to be a very useful tool.<BR><br />
    Thanks for the article.<BR><br />
    <BR><br />
    Ankur<BR>
  • Gravatar - Pierre Grandmaison
    Pierre Grandmaison 00:00, July 2, 2004
    I got it to work without putting line breaks between the log_seperator = ...(no line break, only a space) +address_rewrite ...(no line break, only a space) +all_parents ...
  • Gravatar - Piston
    Piston 04:47, July 23, 2004
    I got nothing but errors... tried putting spaces between everything and what not... should be a little more clear on this. :)
  • Gravatar - Ankur
    Ankur 13:00, July 31, 2004
    oops. Looks like the slash character is missing everywhere from my post.<br />
    <br />
    You need to add a slash (the one below the pipe symbol "|") after each line and it works.<br />
    Don't put the slash on the last line.<br />
    <br />
    Ankur
  • Gravatar - Hamster
    Hamster 16:53, August 1, 2004
    You need to put " \" at the end of each line.
  • Gravatar - Rich
    Rich 03:42, August 4, 2004
    I too used pierre's approach which worked just fine :-)<br />
    <br />
    Piston - did you make sure your editor wasn't puttin carriage returns/line feeds in? I tend to use vi so have probs with that. If its not that try to ensure you have everything patched and up 2 date before making ramprages changes.<br />
    <br />
    Here's Ramprage's text using spaces instead of new lines:<br />
    <br />
    log_selector = +address_rewrite +all_parents +arguments +connection_reject +delay_delivery +delivery_size +dnslist_defer +incoming_interface +incoming_port +lost_incoming_connection +queue_run +received_sender +received_recipients +retry_defer +sender_on_delivery +size_reject +skip_delivery +smtp_confirmation +smtp_connection +smtp_protocol_error +smtp_syntax_error +subject +tls_cipher +tls_peerdn
  • Gravatar - station
    station 15:36, August 8, 2004
    I had the same problem, then I used the Rich way and the errors are gone, now, how to test to be sure that it is working as it should without any conflict.
  • Gravatar - Randy O
    Randy O 23:16, October 2, 2004
    Only problem here is if cpanel updates exim it dumps this unless it is added from the exim editor inside WHM. Very much a pain.
  • Gravatar - xerophyte
    xerophyte 06:06, January 13, 2005
    Simple solution to the above problem <br />
    <br />
    log_selector = all <br />
    <br />
    since you guys have all the log selector selected there<br />
    <br />
    you can use the all keyword <br />
  • Gravatar - Chris
    Chris 17:08, March 16, 2005
    Anyone know how to add this so it's not removed by any cpanel updates?
  • Gravatar - Nick
    Nick 15:11, June 24, 2005
    Jist do <br />
    chattr +i /etc/exim.conf
  • Gravatar - gEEKBOy
    gEEKBOy 16:28, July 22, 2005
    A better way is to add it to the EXIM Config within the WHM interface. <br />
    Under Service Configuration, Exim Conf. Editor, Switch to Advanced Mode and in the very first text box at the top of the exim.conf listing, insert the above commands. cPanel will store these to seperate files which are merged into the exim.conf file at runtime so when cPanel updates the core exim.conf file, your changes are then re-merged into the config file and all is well...<br />
    <br />
    -greg
  • Gravatar - Izzy
    Izzy 02:25, September 27, 2005
    @gEEKBOy - greg<br />
    Correct proceedure for WHM :)<br />
    <br />
    @xerophyte<br />
    Should be:<br />
    log_selector = +all<br />
    <br />
    Syntax:<br />
    log_selector = +arguments -arguments<br />
    <br />
    Izzy
  • Gravatar - Vn-Sg Hosting
    Vn-Sg Hosting 18:24, December 20, 2005
    Rich solution work fine<br />
    Thanks
  • Gravatar - Tiafo
    Tiafo 00:21, August 16, 2006
    help<br />
    <br />
    root@fenix [~]# /etc/init.d/exim restart<br />
    Shutting down clamd: [ OK ]<br />
    Shutting down exim: [FAILED]<br />
    Shutting down antirelayd: [ OK ]<br />
    Shutting down spamd: [ OK ]<br />
    Starting clamd: [ OK ]<br />
    Starting exim-26: 2006-08-15 20:18:25 Exim configuration error in line 30 of /etc/exim.conf:<br />
    "log_selector" option set for the second time<br />
    [FAILED]<br />
    Starting exim: 2006-08-15 20:18:25 Exim configuration error in line 30 of /etc/exim.conf:<br />
    "log_selector" option set for the second time<br />
    [FAILED]<br />
    Starting exim-smtps: 2006-08-15 20:18:25 Exim configuration error in line 30 of /etc/exim.conf:<br />
    "log_selector" option set for the second time<br />
    [FAILED]<br />
    Starting antirelayd: [ OK ]<br />
    Starting spamd: [ OK ]<br />
    root@fenix [~]#
  • Gravatar - masha
    masha 13:37, July 10, 2010
    Hi ;)

Add Your Thoughts

WebHostGear.com is a hosting directory, not a web host.

Copyright © 1998-2018 WebHostGear.com