找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 4449|回复: 0

Windows Cache Extension for PHP 1.1 (Beta2)

[复制链接]
123456AAAAAAA 发表于 2010-5-27 11:29:40 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
安装:There are two packages for this extension: the first package is for PHP versions 5.2.X, and the second package is for PHP 5.3.X. You will need to make sure that you use the appropriate package for your version of PHP.
To install and enable the extension, use the following steps:

  • Unpack the package that is appropriate for the PHP version you are using.
  • Copy the php_wincache.dll file into the PHP extensions folder. Typically this folder is called "ext" and it is located in the same folder with all PHP binary files. For example:
    "C:\Program Files\PHP\ext".
  • Using a text editor, open the php.ini file, which is usually located in the same folder where all PHP binary files are. For example:
    "C:\Program Files\PHP\php.ini".
  • Add the following line at the end of the php.ini file:
    extension = php_wincache.dll
  • Save and close the php.ini file.
  • Recycle your IIS Application Pools for PHP to pick up the configuration changes.
To check that the extension has been enabled, create a file called phpinfo.php with the following PHP code that calls phpinfo() function:
<?php phpinfo(); ?>
Save the phpinfo.php file in the root folder of a IIS web site that uses PHP, then open a browser and make a request to htxxtp://yoursitename/phpinfo.php. Search within the returned web page for a section called "wincache". If the extension is enabled, then you should see the configuration settings provided by the extension.
Compatibility NotesThe extension is supported only on the following configurations:
Windows OS:

  • Windows XP SP3 with IIS 5.1 and FastCGI Extension
  • Windows Server 2003 with IIS 6.0 and FastCGI Extension
  • Windows Vista SP1 with IIS 7.0 and FastCGI Module
  • Windows Server 2008 with IIS 7.0 and FastCGI Module
PHP:

  • PHP 5.2.X, Non-thread-safe build
  • PHP 5.3 X86, Non-thread-safe VC9 build
IMPORTANT: The Windows Cache Extension for PHP can only be used when IIS is configured to run PHP via FastCGI.
Configuration settingsThe following table lists and explains the configuration settings provided by the Windows Cache Extension for PHP. For more detailed information about the configuration settings refer to WinCache Extension - Runtime Configuration.
SettingDefaultMinimumMaximumChangeableDescription
wincache.fcenabled1 (On)0 (Off)1 (On)PHP_INI_ALL Enables or disables the file cache functionality
wincache.fcenabledfilterno valueno valueno valuePHP_INI_SYSTEMDefines a comma separated list of site-ids for which wincache.fcenabled property value is toggled.
wincache.fcachesize24585PHP_INI_SYSTEM Defines the maximum memory size (in megabytes) that is allocated for the file cache. If the total size of all the cached files exceeds the value specified in this setting, then most stale files will be removed from the file cache.
wincache.fcndetect1 (On)0 (Off)1 (On)PHP_INI_SYSTEMEnables or disables the file change notification detection functionality. If file change notification is supported then it will be used to refresh the opcode and file cache entries as soon as the corresponding files are modified on a file system. If file change notification is not supported, for example when using network file shares, then wincache will poll for file changes at regular time intervals specified by wincache.chkinterval.
wincache.maxfilesize256102048PHP_INI_SYSTEM Defines the maximum allowed size (in kilobytes) for a single file to be cached. If a file size exceeds the specified value, the file will not be cached. This setting applies to the file cache only.
wincache.ocenabled1 (On)0 (Off)1 (On)PHP_INI_ALLEnables or disables the opcode cache functionality
wincache.ocenabledfilterno valueno valueno valuePHP_INI_SYSTEMDefines a comma separated list of site-ids for which wincache.ocenabled property value is toggled.
wincache.ocachesize9615255PHP_INI_SYSTEM Defines the maximum memory size (in megabytes) that is allocated for the opcode cache. If the cached opcode size exceeds the specified value, then most stale opcode will be removed from the cache. Note that the opcode cache size must be at least 3 times bigger than file cache size. If that is not the case the opcode cache size will be automatically increased.
wincache.filecount4096102416384PHP_INI_SYSTEM Defines how many files are expected to be cached by the extension, so that appropriate memory size is allocated at the startup time. If the number of files exceeds the specified value, the WinCache will re-allocate more memory as needed.
wincache.chkinterval300, 2300PHP_INI_SYSTEM Defines how often (in seconds) the extension checks for file changes in order to refresh the cache. Setting it to 0 will disable the refreshing of the cache. The file changes will not be reflected in the cache unless the cache entry for that file is removed by scavenger or IIS application pool is recycled or wincache_refresh_if_changed function is called.
wincache.ttlmax12000, 607200PHP_INI_SYSTEM Defines the maximum time to live (in seconds) for a cached entry without being used. Setting it to 0 will disable scavenger which takes care of removing old entries.
wincache.enablecli0 (Off)1 (On)0 (Off)PHP_INI_SYSTEM Defines if caching is enabled when PHP is running in command line (CLI) mode.
wincache.ignorelistno valueno valueno valuePHP_INI_ALL Defines a list of files that should not be cached by the extension. The files list is specified by using file names only, separated by the pipe symbol - "|". For example:

wincache.ignorelist = "index.php|misc.php|admin.php"
wincache.namesaltno valueno valueno valuePHP_INI_SYSTEM Defines a string that will be used when naming the extension specific objects that are stored in shared memory. This is used to avoid conflicts that may be caused if other applications within an IIS worker process tries to access shared memory.
wincache.ucenabled0 (Off)1 (On)1 (On)PHP_INI_SYSTEMEnables or disables the user cache functionality.
wincache.ucachesize5858PHP_INI_SYSTEMDefines the maximum memory size (in megabytes) that is allocated for the user cache. If the total size of variables stored in the user cache exceeds the specified value, then the most stale variables will be removed from the cache.
论坛发展靠大家,积极提供资源;请勿灌水
通过分享您的互联网来赚钱
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|存档|商匡数科 ( 沪ICP备19008575号-1 )

GMT+8, 2024-10-4 12:09 , Processed in 0.035206 second(s), 20 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表