Changeset 13
- Timestamp:
- 12/13/04 19:36:27 (4 years ago)
- Files:
-
- eaccelerator/trunk/README (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
eaccelerator/trunk/README
r4 r13 4 4 What is eAccelerator? 5 5 ---------------------- 6 eAccelerator is a free open source PHP accelerator, optimizer, encoderand7 dynamic content cache for PHP. It increases performance of PHP scripts8 by caching them in compiled state, so that the overhead of compiling isalmost9 completely eliminated. Also it uses some optimizations to speed upexecution10 of PHP scripts. eAccelerator typically reduces server load and increases11 thespeed of your PHP code by 1-10 times.12 13 eAccelerator stores compiled PHP scripts in shared memory and executescode14 directly from it. It creates locks only for short time, while searching6 eAccelerator is a free open source PHP accelerator, optimizer, encoder and 7 dynamic content cache for PHP. It increases performance of PHP scripts by 8 caching them in compiled state, so that the overhead of compiling is almost 9 completely eliminated. Also it uses some optimizations to speed up execution 10 of PHP scripts. eAccelerator typically reduces server load and increases the 11 speed of your PHP code by 1-10 times. 12 13 eAccelerator stores compiled PHP scripts in shared memory and executes code 14 directly from it. It creates locks only for short time, while searching 15 15 compiled PHP script in the cache, so one script can be executed simultaneously 16 by several engines. MM shared memory library (http://www.engelschall.com/sw/mm/) 17 was used by eAccelerator before version 2.3.13 for management of the shared 18 memory and locking. Files that can't fit in shared memory are cached on disk only. 16 by several engines. MM shared memory library http://www.engelschall.com/sw/mm/ 17 was used by eAccelerator before version 2.3.13 for management of the shared 18 memory and locking. Files that can't fit in shared memory are cached on disk 19 only. 19 20 20 21 eAccelerator was first launched in 2001 to speed up the www.guestbooks4all.com 21 22 service. It has been tested with PHP 4.1.0 - 4.3.3 under GNU/Linux and Windows 22 with Apache 1.3 and 2.0. 23 Patches for ports to other OSs and PHP versions are welcome. 24 25 Since version 2.3.10, eAccelerator contains a PHP encoder and loader. 26 You can encode PHP scripts using encoder.php in order to distribute them without 27 sources. Encoded files can be run on any site which runs PHP with eAccelerator 28 2.3.10 or above. The sources of encoded scripts can't be restored because 29 they are stored in a compiled form and the encoded version doesn't contain 30 the source. Of course, some internals of the scripts can be restored with 31 different reverse engineering tools (disassemblers, debuggers, etc), but it is 32 not trivial. 33 34 Since version 2.3.15, eAccelerator is compatible with Zend Optimizer's 35 loader. Zend Optimizer must be installed after eAccelerator in php.ini. 36 If you don't use scripts encoded with Zend Encoder then we do not recommend 37 you install Zend Optimizer with eAccelerator. 23 with Apache 1.3 and 2.0. Patches for ports to other OSs and PHP versions are 24 welcome. 25 26 eAccelerator contains a PHP encoder and loader. You can encode PHP scripts 27 using encoder.php in order to distribute them without sources. Encoded files 28 can be run on any site which runs PHP with eAccelerator. The sources of 29 encoded scripts can't be restored because they are stored in a compiled form 30 and the encoded version doesn't contain the source. Of course, some internals 31 of the scripts can be restored with different reverse engineering tools 32 (disassemblers, debuggers, etc), but it is not trivial. 33 34 eAccelerator is compatible with Zend Optimizer's loader. Zend Optimizer must 35 be installed after eAccelerator in php.ini. If you don't use scripts encoded 36 with Zend Encoder then we do not recommend you install Zend Optimizer with 37 eAccelerator. 38 38 39 39 eAccelerator does not work in CGI mode. 40 40 41 41 42 Here are some other products that provide the same functionality: … … 49 50 Where is eAccelerator already used? 50 51 ----------------------------------- 51 The following you will find a list of sites that use eAccelerator 52 If you want to be added, please send e-mail to frankalcantara@users.sourceforge.net52 The following you will find a list of sites that use eAccelerator. If you want 53 to be added, please send e-mail to frankalcantara at users.sourceforge.net 53 54 54 55 - HomePage Title (http://www.xxx.com) … … 70 71 ------------- 71 72 This version of the eAccelerator has been successfully tested on PHP 72 4.1.0-4.3.3 under RedHat Linux 7.0, 7.3, 8.0 and Windows 73 with Apache 1.3 and2.0.73 4.1.0-4.3.3 under RedHat Linux 7.0, 7.3, 8.0 and Windows with Apache 1.3 74 and Apache 2.0. 74 75 75 76 … … 79 80 80 81 export PHP_PREFIX="/usr" 82 81 83 $PHP_PREFIX/bin/phpize 82 ./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config 84 85 ./configure \ 86 --enable-eaccelerator=shared \ 87 --with-php-config=$PHP_PREFIX/bin/php-config 88 83 89 make 84 90 … … 147 153 eaccelerator.cache_dir 148 154 The directory that is used for disk cache. eAccelerator stores precompiled 149 code, session data, content and user entries here. The same data canbe155 code, session data, content and user entries here. The same data can be 150 156 stored in shared memory also (for more quick access). Default value is 151 157 "/tmp/eaccelerator". 152 158 153 159 eaccelerator.enable 154 Enables or disables eAccelerator. Should be "1" for enabling or155 "0" fordisabling. Default value is "1".160 Enables or disables eAccelerator. Should be "1" for enabling or "0" for 161 disabling. Default value is "1". 156 162 157 163 eaccelerator.optimizer 158 Enables or disables internal peephole optimizer which may speed upcode159 execution. Should be "1" for enabling or "0" for disabling. 160 Default valueis "1".164 Enables or disables internal peephole optimizer which may speed up code 165 execution. Should be "1" for enabling or "0" for disabling. Default value 166 is "1". 161 167 162 168 eaccelerator.debug 163 Enables or disables debug logging. Should be "1" for enabling or 164 "0" fordisabling. Default value is "0".169 Enables or disables debug logging. Should be "1" for enabling or "0" for 170 disabling. Default value is "0". 165 171 166 172 eaccelerator.check_mtime 167 Enables or disables PHP file modification checking . Should be "1"168 for enabling or "0" for disabling. You should set it to "1" if you want169 torecompile PHP files after modification. Default value is "1".173 Enables or disables PHP file modification checking . Should be "1" for 174 enabling or "0" for disabling. You should set it to "1" if you want to 175 recompile PHP files after modification. Default value is "1". 170 176 171 177 eaccelerator.filter 172 Determine which PHP files must be cached. You may specify the numberof173 patterns (for example "*.php *.phtml") which specifies to cache or 174 not to cache. If pattern starts with the character "!", it means to ignore175 files which are matched by the following pattern. Default value is "" that176 means -all PHP scripts will be cached.178 Determine which PHP files must be cached. You may specify the number of 179 patterns (for example "*.php *.phtml") which specifies to cache or not to 180 cache. If pattern starts with the character "!", it means to ignore files 181 which are matched by the following pattern. Default value is "" that means 182 all PHP scripts will be cached. 177 183 178 184 eaccelerator.shm_max 179 Disables putting large values into shared memory by "eaccelerator_put()" 180 function. 181 It indicates the largest allowed size in bytes (10240, 10K, 1M). The "0" 182 disables the limit. Default value is "0". 185 Disables putting large values into shared memory by " eaccelerator_put() " 186 function. It indicates the largest allowed size in bytes (10240, 10K, 1M). 187 The "0" disables the limit. Default value is "0". 183 188 184 189 eaccelerator.shm_ttl 185 190 When eaccelerator fails to get shared memory for new script it removes all 186 scripts which were not accessed at last "shm_ttl" seconds fromshared187 memory. Default value is "0" that means - don't remove any filesfrom191 scripts which were not accessed at last "shm_ttl" seconds from shared 192 memory. Default value is "0" that means - don't remove any files from 188 193 shared memory. 189 194 190 195 eaccelerator.shm_prune_period 191 When eaccelerator fails to get shared memory for new script it tryes to192 remove old script if the previous try was made more then "shm_prune_period"193 seconds ago. Default value is "0" that means - don't try to remove any194 files from shared memory.196 When eaccelerator fails to get shared memory for new script it tryes to 197 remove old script if the previous try was made more then 198 "shm_prune_period" seconds ago. Default value is "0" that means - don't 199 try to remove any files from shared memory. 195 200 196 201 eaccelerator.shm_only 197 Enables or disables caching of compiled scripts on disk. It has noeffect198 on session data and content caching. Default value is "0" that means - 199 usedisk and shared memory for caching.202 Enables or disables caching of compiled scripts on disk. It has no effect 203 on session data and content caching. Default value is "0" that means - use 204 disk and shared memory for caching. 200 205 201 206 eaccelerator.compress 202 Enables or disables cached content compression. Default value is "1"that207 Enables or disables cached content compression. Default value is "1" that 203 208 means enable compression. 204 209 205 210 eaccelerator.compress_level 206 Compression level used for content caching. Default value is "9" which 207 isthe maximum value211 Compression level used for content caching. Default value is "9" which is 212 the maximum value 208 213 209 214 eaccelerator.keys … … 227 232 228 233 eaccelerator_get($key) 229 returns the value from shared memory which was stored by eaccelerator_put() or230 null if it is not exists or was expired.234 returns the value from shared memory which was stored by eaccelerator_put() 235 or null if it is not exists or was expired. 231 236 232 237 eaccelerator_rm($key) … … 237 242 238 243 eaccelerator_lock($lock) 239 creates a lock with specified name. The lock can be released byfunction244 creates a lock with specified name. The lock can be released by function 240 245 eaccelerator_unlock() or automatic on the end of request. 241 246 For Example: … … 269 274 For Example: 270 275 <?php 271 eaccelerator_cache_page($_SERVER['PHP_SELF'].'?GET='.serialize($_GET), 30);276 eaccelerator_cache_page($_SERVER['PHP_SELF'].'?GET='.serialize($_GET),30); 272 277 echo time(); 273 278 phpinfo(); … … 275 280 276 281 eaccelerator_rm_page($key) 277 removes the page which was cached by eaccelerator_cache_page() with the same 282 removes the page which was cached by eaccelerator_cache_page() with the same 278 283 $key from cache 279 284 … … 286 291 WEB interface 287 292 ------------- 288 eAccelerator can be managed through web interface script eaccelerator.php.289 So you need to put this file on your web site. For security reasons itis293 eAccelerator can be managed through web interface script eaccelerator.php. So 294 you need to put this file on your web site. For security reasons it is 290 295 recommended to restrict the usage of this script by your local IP. 291 296 292 Since version 2.3.18 admin interface may be protected by password. 293 To generate password run the eaccelerator_password.php from command line and 294 follow theinstruction.297 Since version 2.3.18 admin interface may be protected by password. To generate 298 password run the eaccelerator_password.php from command line and follow the 299 instruction. 295 300 296 301 $ php -q eaccelerator_password.php … … 306 311 eaccelerator.admin.password="$1$0ScD9gkb$nOEmFerNMvQ576hELeLrG0" 307 312 308 If you use eaccelerator.php in directory that is password-protected by HTTPD313 If you use eaccelerator.php in directory that is password-protected by HTTPD 309 314 then eaccelerator's admin name and password must be the same. 310 315