head	1.12;
access;
symbols
	PHP_5_1_BRANCH:1.11
	RELEASE_0_9_4:1.12
	RC2_0_9_4:1.12
	PHP_5_1:1.11.0.2
	R0_9_4-RC1:1.11
	release-0-9-3-final:1.9
	release-candidate-0-9-3-rc2:1.9
	pre-0-9-3:1.7.0.2
	release-0-9-2a:1.6
	release-0-9-1:1.4
	start:1.1.1.1
	eAccelerator:1.1.1;
locks; strict;
comment	@# @;


1.12
date	2006.02.08.11.24.36;	author zoeloelip;	state Exp;
branches;
next	1.11;

1.11
date	2005.11.20.18.02.09;	author zoeloelip;	state Exp;
branches;
next	1.10;

1.10
date	2005.11.15.12.30.24;	author zoeloelip;	state Exp;
branches;
next	1.9;

1.9
date	2005.05.09.21.50.54;	author franck34;	state Exp;
branches;
next	1.8;

1.8
date	2005.05.09.21.39.55;	author franck34;	state Exp;
branches;
next	1.7;

1.7
date	2005.01.13.21.48.03;	author frankalcantara;	state Exp;
branches;
next	1.6;

1.6
date	2004.12.22.19.15.21;	author franck34;	state Exp;
branches;
next	1.5;

1.5
date	2004.12.22.19.10.52;	author franck34;	state Exp;
branches;
next	1.4;

1.4
date	2004.12.17.16.00.37;	author franck34;	state Exp;
branches;
next	1.3;

1.3
date	2004.12.13.20.30.16;	author franck34;	state Exp;
branches;
next	1.2;

1.2
date	2004.12.13.18.36.27;	author franck34;	state Exp;
branches;
next	1.1;

1.1
date	2004.12.10.16.08.39;	author everaldo_canuto;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2004.12.10.16.08.39;	author everaldo_canuto;	state Exp;
branches;
next	;


desc
@@


1.12
log
@Fixed some typos and cleaned up the README file a bit more
Fixed some typos in README.eLoader
@
text
@eAccelerator for PHP
=====================

What is eAccelerator?
----------------------
eAccelerator 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. It also optimises  the  script  to speed  up  execution
of PHP scripts. eAccelerator typically reduces server load and  increases  the
speed of your PHP code by 1-10 times.

eAccelerator is a fork of TurckMMCache 
( http://sourceforge.net/project/turckmm-cache/  by Dmitry Stogov )

eAccelerator stores compiled PHP scripts in shared memory  and  executes  code
directly from it. It creates  locks  only  for  short  time,  while  searching 
compiled PHP script in the cache, so one script can be executed simultaneously
by several engines. Files that can't fit in shared memory are cached  on  disk
only.

eAccelerator 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  eAccelerator.  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.

eAccelerator is compatible with Zend Optimizer's loader. Zend  Optimizer  must
be installed after eAccelerator in php.ini. If you don't use  scripts  encoded
with  Zend  Encoder  we  do  not  recommend  to  install  Zend  Optimizer with 
eAccelerator.

eAccelerator does not work in CGI mode but it does work in Fast-CGI mode with
webservers like lighttpd.


Here are some other products that provide the same functionality:

 - Zend Performance Suite (http://www.zend.com/)
 - Alternative PHP Cache (http://pecl.php.net/package/APC)

Download
--------
Latest eAccelerator versions can be downloaded at the sourceforge page:
http://sourceforge.net/projects/eaccelerator/
Development snapshots from cvs can be downloaded at 
http://snapshots.eaccelerator.net


Requirements
------------
apache >= 1.3, mod_php >= 4.1, autoconf, automake, libtool, m4


Compatibility
-------------
eAccelerator has been reported working with php4 and php5, php 5.1 support
hasn't been integrated yet. It is being used on Linux, FreeBSD, MacOS X, 
Solaris and Windows with apache 1.3 and 2, lighttpd and IIS.


Quick install
-------------

You can find more information about installation on eAccelerator website.
http://eaccelerator.sourceforge.net/

Note(1): for Microsoft Windows installation, please refer to README.win32 file.

Step 1. Compiling eAccelerator

  export PHP_PREFIX="/usr"
  
  $PHP_PREFIX/bin/phpize
  
  ./configure \
  --enable-eaccelerator=shared \
  --with-php-config=$PHP_PREFIX/bin/php-config
  
  make

  You must specify the real prefix where PHP is installed in the "export"
  command. It may be "/usr" "/usr/local", or something else.

Step 2. Installing eAccelerator

  make install

Step 3. Configuring eAccelerator

eAccelerator can be installed both as Zend or PHP extension.

For eaccelerator > 0.9.1, if you have /etc/php.d directory, you should copy eaccelerator.ini inside and modify default value if you need.

If not, you need to edit your php.ini file (usually /etc/php.ini).

To install as Zend extension:

  zend_extension="/usr/lib/php4/eaccelerator.so"
  eaccelerator.shm_size="16"
  eaccelerator.cache_dir="/tmp/eaccelerator"
  eaccelerator.enable="1"
  eaccelerator.optimizer="1"
  eaccelerator.check_mtime="1"
  eaccelerator.debug="0"
  eaccelerator.filter=""
  eaccelerator.shm_max="0"
  eaccelerator.shm_ttl="0"
  eaccelerator.shm_prune_period="0"
  eaccelerator.shm_only="0"
  eaccelerator.compress="1"
  eaccelerator.compress_level="9"

  If you use thread safe build of PHP you must use "zend_extension_ts" instead
  of "zend_extension".

To install as PHP extension:

  extension="eaccelerator.so"
  eaccelerator.shm_size="16"
  eaccelerator.cache_dir="/tmp/eaccelerator"
  eaccelerator.enable="1"
  eaccelerator.optimizer="1"
  eaccelerator.check_mtime="1"
  eaccelerator.debug="0"
  eaccelerator.filter=""
  eaccelerator.shm_max="0"
  eaccelerator.shm_ttl="0"
  eaccelerator.shm_prune_period="0"
  eaccelerator.shm_only="0"
  eaccelerator.compress="1"
  eaccelerator.compress_level="9"  

Step 4. Creating cache directory

  mkdir /tmp/eaccelerator
  chmod 0777 /tmp/eaccelerator


Configuration Options
---------------------

eaccelerator.shm_size
    The amount of shared memory (in megabytes) that eAccelerator will use.
    "0" means OS default. Default value is "0".

eaccelerator.cache_dir
    The directory that is used for disk cache. eAccelerator stores precompiled
    code, session data, content and user entries  here. The same data  can  be
    stored in shared memory also (for more quick access). Default value is
    "/tmp/eaccelerator".

eaccelerator.enable
    Enables or disables eAccelerator. Should be "1" for enabling  or  "0"  for
    disabling. Default value is "1".

eaccelerator.optimizer
    Enables or disables internal peephole optimizer which may  speed  up  code
    execution. Should be "1" for enabling or "0" for disabling. Default  value
    is "1".

eaccelerator.debug
    Enables or disables debug logging. Should be "1" for enabling or  "0"  for
    disabling. Default value is "0".

eaccelerator.check_mtime
    Enables or disables PHP file modification checking .  Should  be  "1"  for
    enabling or "0" for disabling. You should set it to "1"  if  you  want  to
    recompile PHP files after modification. Default value is "1".

eaccelerator.filter
    Determine which PHP files must be cached. You may specify  the  number  of
    patterns (for example "*.php *.phtml") which specifies to cache or not  to
    cache. If pattern starts with the character "!", it means to ignore  files
    which are matched by the following pattern. Default value is "" that means 
    all PHP scripts will be cached.

eaccelerator.shm_max
    Disables putting large values into shared memory by " eaccelerator_put() "
    function. It indicates the largest allowed size in bytes (10240, 10K, 1M). 
    The "0" disables the limit. Default value is "0".

eaccelerator.shm_ttl
    When eaccelerator fails to get shared memory for new script it removes all
    scripts which were not accessed  at  last "shm_ttl"  seconds  from  shared
    memory. Default value is "0" that means -  don't  remove  any  files  from
    shared memory.

eaccelerator.shm_prune_period
    When eaccelerator fails to get shared memory for new script  it  tryes  to
    remove  old  script   if   the   previous   try   was   made   more   then
    "shm_prune_period" seconds ago. Default value is "0" that  means  -  don't
    try to remove any files from shared memory.

eaccelerator.shm_only
    Enables or disables caching of compiled scripts on disk. It has  no  effect
    on session data and content caching. Default value is "0" that means -  use
    disk and shared memory for caching.

eaccelerator.compress
    Enables or disables cached content compression. Default value is  "1"  that
    means enable compression.

eaccelerator.compress_level
    Compression level used for content caching.  Default value is "9" which  is
    the maximum value

eaccelerator.name_space
    A string that's prepended to all keys. This allows two applications that 
    use the same key names to run on the same host by setting this in .htaccess
    or in the main configuration file for the whole webserver.
    
eaccelerator.keys
eaccelerator.sessions
eaccelerator.content
    Determine where keys, session data and content will be cached. The possible
    values are:
    "shm_and_disk" - cache data in shared memory and on disk (default value)
    "shm"          - cache data in shared memory or on disk if shared memory
                     is full or data size greater then "eaccelerator.shm_max"
    "shm_only"     - cache data in shared memory
    "disk_only"    - cache data on disk
    "none"         - don't cache data


eAccelerator API
----------------

eaccelerator_put($key, $value, $ttl=0)
  puts the $value into shard memory for $ttl seconds.

eaccelerator_get($key)
  returns the value from shared memory which was stored by  eaccelerator_put()
  or null if it is not exists or was expired.

eaccelerator_rm($key)
  removres the $key from shared memory

eaccelerator_gc()
  removes all expired keys from shared memory

eaccelerator_lock($lock)
  creates a lock with specified name. The lock can  be  released  by  function
  eaccelerator_unlock() or automatic on the end of request.
  For Example:
  <?php
    eaccelerator_lock("count");
    eaccelerator_put("count",eaccelerator_get("count")+1));
  ?>

eaccelerator_unlock($lock)
  release lock with specified name

eaccelerator_set_session_handlers()
  install the eaccelerator session handlers.
  Since PHP 4.2.0 you can install eaccelerator session handlers
  in "php.ini" by "session.save_handler=eaccelerator".

eaccelerator_cache_output($key, $eval_code, $ttl=0)
  caches the output of $eval_code in shared memory for $ttl seconds.
  Output can be removed from cache by calling mmcach_rm() with the same $key.
  For Example:
  <?php eaccelerator_cache_output('test', 'echo time(); phpinfo();', 30); ?>

eaccelerator_cache_result($key, $eval_code, $ttl=0)
  caches the result of $eval_code in shared memory for $ttl seconds.
  Result can be removed from cache by calling mmcach_rm() with the same $key.
  For Example:
  <?php eaccelerator_cache_output('test', 'time()." Hello";', 30); ?>

eaccelerator_cache_page($key, $ttl=0)
  caches the full page for $ttl seconds.
  For Example:
  <?php
    eaccelerator_cache_page($_SERVER['PHP_SELF'].'?GET='.serialize($_GET),30);
    echo time();
    phpinfo();
  ?>

eaccelerator_rm_page($key)
  removes the page which was cached by eaccelerator_cache_page() with the same
  $key from cache

eaccelerator_encode($filename)
  returns the encoded bytecode of compiled file $filename

eaccelerator_load($code)
  loads script which was encoded by eaccelerator_encode()

WEB interface
-------------
eAccelerator can be managed through web interface script  eaccelerator.php. So
you need to put this file on  your  web  site.  For  security  reasons  it  is
recommended to restrict the usage of this script by your local IP.

Since version 2.3.18 admin interface may be protected by password. To generate
password run the eaccelerator_password.php from command line  and  follow  the 
instruction.

  $ php -q eaccelerator_password.php
  Changing password for eAccelerator Web Interface (eaccelerator.php)

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

  Add the following lines into your php.ini and restart HTTPD

  eaccelerator.admin.name="admin"
  eaccelerator.admin.password="$1$0ScD9gkb$nOEmFerNMvQ576hELeLrG0"

If you use eaccelerator.php in directory that is password-protected  by  HTTPD
then eaccelerator's admin name and password must be the same.


Contact us
----------
You can contact us with questions, patches or bugs, by sending an email to
Bart Vanbrabant <zoeloelip at users.sourceforge.net>
@


1.11
log
@Updated README
@
text
@d9 1
a9 1
completely eliminated. Also it uses some optimizations to speed  up  execution
d32 1
a32 1
with Zend Encoder then we do not recommend you  install  Zend  Optimizer  with
a41 1
 - PHP Accelerator (http://www.php-accelerator.co.uk/)
a43 38

Where is eAccelerator already used?
-----------------------------------
The following you will find a list of sites that use eAccelerator. If you want
to be added, please send e-mail to frankalcantara at users.sourceforge.net

 - The Slovenian National RTV Station (http://www.rtvslo.si)
  The Slovenian National RTV Station and its news/misc portal with forums. 
  Over 3500 users and more than 37000 forum messages in a year. 
  Two round-robin servers for the masses, and an administrator server. 
  6 000 000 pageloads monthly.
	
 - An other game oriented french website (http://www.mondespersistants.com)
  An other game oriented french website with 6 000 000 pageloads monthly. 
  http://guildes.mondespersistants.com is a full PHP5 oo development. 
  Theses websites are running under freebsd/apache 1.3/php 5.0.3/eaccelerator 0.9.2
	
 - Andrew Hutchings - Linux Guru  ( http://www.domaincity.co.uk/)
  Andrew Hutchings - Linux Guru - Just a quick message to say we are now using 
  eaccelerator as a replacement for mmcache on 2 of our 3 node round robin 
  clusters, 2.5million hits per day. We will be doubling this in the next few week, 
  as well as implementing new clusters.
	
 - elearning server (http://www.ets-online.de)
  Denny Reeh - System Developer - The e/t/s didactic media provides an elearning 
  server (Distance Learning System) written in PHP. We are hosting the systems 
  for our customers mainly by ourself. So we have 5 live-servers 
  (freebsd, apache2, php4, eaccelerator) with 5.5 million hits per month. 
  First without eAccelerator we should have installed more servers for good 
  performance and secondly we improve the customer convenience by quartering 
  the medium response time of a script.
 
- Browser game (http://www.mafia-inc.de)
  The Mafia-Incorporated is a succesfull Browser game with around 2.500.000
  pages impressions each day and over 5000 user.
  (GNU Linux(debian) / Apache 2.0.53 / PHP 4.3.10-9 / eAccelerator 0.9.2a)
  

d48 2
d54 1
a54 1
apache 1.3, mod_php 4.1, autoconf, automake, libtool, m4
d59 1
a59 1
eAccelerator has been reported working with php4 and php5 but php 5.1 support
d209 5
@


1.10
log
@README updates
i386 <-> x86_64 spinlock test
@
text
@d35 2
a36 1
eAccelerator does not work in CGI mode.
a43 1
 - AfterBurner Cache (http://bwcache.bware.it/)
d96 3
a98 3
This version of the eAccelerator has been successfully tested on PHP
4.1.0-4.3.3 under Fedora 1, 2, 3, 4 and Debian 3.1 and Windows with Apache 1.3 
and Apache 2.0.
@


1.9
log
@- adding README.win32 link for win32 user (installation)
- adding website referer in install section.
@
text
@d97 1
a97 1
4.1.0-4.3.3 under RedHat Linux 7.0, 7.3, 8.0 and Windows with Apache 1.3 
d352 2
a353 2
To contact us with questions, patches or bugs, please send e-mail to
Frank Alcantara <frankalcantara at users.sourceforge.net>
@


1.8
log
@adding content of http://eaccelerator.net/SuccessCasesUk into the README
(0.9.3-rc1)
@
text
@d103 6
@


1.7
log
@Correction of alternates link...
@
text
@d51 31
a81 3
 - HomePage Title (http://www.xxx.com)
   homepage description

@


1.6
log
@adding eacceleratoris a fork of turckmmcache
@
text
@d42 2
a43 2
 - Alternative PHP Cache (http://apc.communityconnect.com/)
 - AfterBurner Cache (http://www.bwcache.bware.it/)
@


1.5
log
@- remove a part dedicated to turckmmcache (first launched in 2001, ...)
- information about /etc/php.d in the configuration step (3)
@
text
@d13 3
@


1.4
log
@Cosmetic change: remove any turckmmcache version reference.
@
text
@a18 5
eAccelerator was first launched in 2001 to speed up the www.guestbooks4all.com
service. It has been tested with 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.

d93 5
a97 2
eAccelerator can be installed both as Zend or PHP extension, so you need
to edit your php.ini file (usually /etc/php.ini).
@


1.3
log
@- email adress without @@ for spam (due to the webCVS)
@
text
@d16 1
a16 3
by several engines. MM shared memory library http://www.engelschall.com/sw/mm/
was used by eAccelerator before version 2.3.13 for management  of  the  shared
memory and locking. Files that can't fit in shared memory are cached  on  disk
@


1.2
log
@only cosmetical changes
@
text
@d320 1
a320 1
Frank Alcantara <frankalcantara@@users.sourceforge.net>
@


1.1
log
@Initial revision
@
text
@d6 6
a11 6
eAccelerator 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. eAccelerator typically reduces server load and increases
the speed of your PHP code by 1-10 times.
d13 2
a14 2
eAccelerator stores compiled PHP scripts in shared memory and executes code
directly from it. It creates locks only for short time, while searching
d16 4
a19 3
by several engines. MM shared memory library (http://www.engelschall.com/sw/mm/)
was used by eAccelerator before version 2.3.13 for management of the shared
memory and locking. Files that can't fit in shared memory are cached on disk only.
d23 2
a24 2
with Apache 1.3 and 2.0.
Patches for ports to other OSs and PHP versions are welcome.
d26 12
a37 13
Since version 2.3.10, eAccelerator 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 eAccelerator
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, eAccelerator is compatible with Zend Optimizer's
loader. Zend Optimizer must be installed after eAccelerator in php.ini.
If you don't use scripts encoded with Zend Encoder then we do not recommend
you install Zend Optimizer with eAccelerator.
d41 1
d52 2
a53 2
The following you will find a list of sites that use eAccelerator
If you want to be added, please send e-mail to frankalcantara@@users.sourceforge.net
d73 2
a74 2
4.1.0-4.3.3 under RedHat Linux 7.0, 7.3, 8.0 and Windows
with Apache 1.3 and 2.0.
d82 1
d84 5
a88 1
  ./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config
d155 1
a155 1
    code, session data, content and user entries  here. The same data can be
d160 2
a161 2
    Enables or disables eAccelerator. Should be "1" for enabling or
    "0" for disabling. Default value is "1".
d164 3
a166 3
    Enables or disables internal peephole optimizer which may speed up code
    execution. Should be "1" for enabling or "0" for disabling.
    Default value is "1".
d169 2
a170 2
    Enables or disables debug logging. Should be "1" for enabling or
    "0" for disabling. Default value is "0".
d173 3
a175 3
    Enables or disables PHP file modification checking. Should be "1"
    for enabling or "0" for disabling. You should set it to "1" if you want
    to recompile PHP files after modification. Default value is "1".
d178 5
a182 5
    Determine which PHP files must be cached. You may specify the number of
    patterns (for example "*.php *.phtml") which specifies to cache or
    not to cache. If pattern starts with the character "!", it means to ignore
    files which are matched by the following pattern. Default value is "" that
    means - all PHP scripts will be cached.
d185 3
a187 4
    Disables putting large values into shared memory by "eaccelerator_put()"
    function.
    It indicates the largest allowed size in bytes (10240, 10K, 1M). The "0"
    disables the limit. Default value is "0".
d191 2
a192 2
    scripts which were not accessed at last "shm_ttl" seconds from shared
    memory. Default value is "0" that means - don't remove any files from
d196 4
a199 4
    When eaccelerator fails to get shared memory for new script it tryes to 
    remove old script if the previous try was made more then "shm_prune_period"
    seconds ago. Default value is "0" that means - don't try to remove any
    files from shared memory.
d202 3
a204 3
    Enables or disables caching of compiled scripts on disk. It has no effect
    on session data and content caching. Default value is "0" that means -
    use disk and shared memory for caching.
d207 1
a207 1
    Enables or disables cached content compression. Default value is "1" that
d211 2
a212 2
    Compression level used for content caching.  Default value is "9" which
    is the maximum value
d234 2
a235 2
  returns the value from shared memory which was stored by eaccelerator_put() or
  null if it is not exists or was expired.
d244 1
a244 1
  creates a lock with specified name. The lock can be released by function
d276 1
a276 1
    eaccelerator_cache_page($_SERVER['PHP_SELF'].'?GET='.serialize($_GET), 30);
d282 1
a282 1
  removes the page which was cached by eaccelerator_cache_page() with the same 
d293 2
a294 2
eAccelerator can be managed through web interface script eaccelerator.php.
So you need to put this file on your web site. For security reasons it is
d297 3
a299 3
Since version 2.3.18 admin interface may be protected by password.
To generate password run the eaccelerator_password.php from command line and
follow the instruction.
d313 1
a313 1
If you use eaccelerator.php in directory that is password-protected by HTTPD 
@


1.1.1.1
log
@Initial import.
@
text
@@
