diff --git a/install/pecl.xml b/install/pecl.xml
index 0b040e128..21e89bfab 100755
--- a/install/pecl.xml
+++ b/install/pecl.xml
@@ -1,34 +1,32 @@
-
-
+
+
- PECL 扩展库安装
+ PECL 扩展安装PECL 安装介绍
- PECL
- 是通过 PEAR 打包系统来的
+ &link.pecl;
+ 通过 PEAR 打包系统来的
PHP 扩展库仓库,本章内容示范了怎样取得并安装 PECL 扩展。
- 以下指南中假定 /your/phpsrcdir/ 是 PHP
- 源程序的路径,extname 是 PECL
- 扩展库的名字。自己根据实际情况调整。此外还假定用户熟悉
- pear 命令。
- PEAR 手册里 pear 命令的信息同样适用于 pecl。
+ 以下指南中假设 /path/to/php/src/dir 是 PHP
+ 源代码发布包的路径,extname 是 PECL
+ 扩展库的名字。自己根据实际情况调整。此外还假设用户熟悉
+ pear 命令。PEAR
+ 手册里 pear 命令的信息同样适用于 pecl。
- 要使用共享扩展库,必须经过编译,安装,然后加载。以下说明的方法提供了怎样编译和安装扩展库的各种指导,但并不会自动加载它们。可以通过将其包括在
+ 共享扩展库必须经过编译、安装和加载才能使用。以下说明的方法提供了怎样编译和安装扩展库的各种指导,但并不会自动加载它们。可以通过将其包括在
&php.ini; 中用
extension PHP 指令加载,或者
用 dl 函数。
-
-
- 当编译 PHP 模块时,拥有各种工具(autoconf,automake,libtool
+ 当编译 PHP 模块时,拥有各种工具(autoconf、automake、libtool
等)的已知好使的版本很重要。所需工具和所需版本的详情见匿名 Git 说明。
@@ -42,8 +40,7 @@
- pecl install extname 命令会自动下载扩展代码,
- 所以在这种情况下不需要再次下载。
+ pecl install extname 命令会自动下载扩展代码,所以在这种情况下不需要再次下载。
@@ -52,17 +49,17 @@
PECL 网站包括有 PHP
- 开发组提供的不同扩展库的信息。这里的信息包括:更新记录,版本说明,需求,以及其它信息。
+ 开发组提供的不同扩展库的信息。这里的信息包括:更新记录、版本说明、需求以及其它信息。
- pecl download extname
+ pecl download extname
PECL 网站中列出的 PECL 扩展库的发行版本可以用
pear
- 命令 来下载和安装。也可以指明具体的修正版。
+ 命令 来下载和安装。也可以指定具体的修订版本。
@@ -80,12 +77,12 @@
部分 PECL 扩展库也在 SVN 中。其 web 页面见
- be seen at &url.php.svn;pecl/。要直接从
+ &url.php.svn;pecl/。要直接从
SVN 中下载,用以下命令:
-$ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
+$ svn checkout https://svn.php.net/repository/pecl/extname/trunk extname
@@ -94,8 +91,7 @@ $ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
Windows 下载
- PHP 官方已为 Windows 预编译了大部分的 PECL 扩展(.dll 文件),可以直接从
- PECL 官网下载。
+ PHP 项目在 package 页面上编译并提供大多数 PECL 扩展的 Windows DLL 文件。
@@ -107,48 +103,42 @@ $ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
在 Windows 上有两种加载 PHP 扩展的方式:把扩展编译进 PHP,或者加载 DLL。加载预编译的扩展是更简单更被推荐的方式。
- 要加载某扩展,需要在系统中有其相对应的 “.dll” 文件。所有扩展都会由
+ 要加载扩展,需要在系统中有可用的 .dll 文件。所有扩展都会由
PHP 小组定期自动编译(如何下载见下节)。
- 要将一扩展编译入 PHP,请参考 从源程序编译 一章。
+ 要将扩展编译入 PHP,请参考从源程序编译文档。
- 要编译一个独立的扩展(即 DLL 文件),请参考 从源程序编译 一章。如果在
- PHP 发行包和 PCEL 中都没有某 DLL 文件,那可能需要自己编译之后才能使用该扩展。
+ 要编译一个独立的扩展(即 DLL 文件),请参考从源程序编译文档。如果在
+ PHP 发行版和 PCEL 中都没有某 DLL 文件,那可能需要编译之后才能使用该扩展。
-
去哪里找扩展库?
- PHP 扩展库通常称为“php_*.dll”(其中星号代表具体某扩展的名字),位于“PHP\ext”目录下。
+ PHP 扩展库通常称为 php_*.dll(其中星号代表具体某扩展的名字),位于 PHP\ext 目录下。
- PHP 发行包中包括了大多数开发者最常用到的扩展库。这些被称为“核心”扩展库。
+ PHP 发行包中包括了大多数开发者最常用到的扩展库。称为捆绑扩展库。
- 不过呢,如果用户所需要的功能并没有被任何核心扩展提供,那还是有可能在
- PECL 中找到。PHP Extension Community Library(PECL,PHP 扩展社区库)是个
- PHP 扩展的储存室,提供了对于所有已知扩展的下载及开发途径的指南。
+ 不过,如果捆绑扩展没有提供所需的功能,可以在 &link.pecl; 中找到满足需求的扩展。PHP 扩展社区库(PHP Extension Community Library 简称 PECL)是个
+ PHP 扩展的储存库,提供了对于所有已知扩展目录以及下载及开发 PHP 扩展的托管设施。
- 如果用户开发了一个自己使用的扩展,可以考虑将其发布到 PECL
- 中以便于其他有相同需求的用户使用。一个很好的副作用是可以得到其他用户的反馈,感谢,错误报告甚至修正/更新。不过在向
- PECL 发布扩展之前,请先阅读
+ 如果针对特定用途开发了扩展,则可以将其托管在 PECL
+ 中以便于其他有相同需求的用户使用。这样做的好处就是可以得到其他用户的反馈、感谢、错误报告甚至修复/补丁。不过在向
+ PECL 提交扩展之前,请先阅读
PECL 提交指南。
-
-
-
-
下载哪个扩展?
- 用户常常会发现每个 DLL 都有好几个版本:
+ 很多时候,每个 DLL 都有几个版本可供选择:
@@ -178,12 +168,12 @@ $ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
- 请记住用户的扩展设定应该与所使用的 PHP 可执行文件的设定都保持一致。以下脚本可以显示所有
- PHP 设定:
+ 请记住,扩展设置应该与所使用的 PHP 可执行文件的设置相匹配。以下脚本可以显示所有
+ PHP 设置:
- phpinfo call
+ 调用 phpinfo
@@ -206,47 +196,47 @@ drive:\\path\to\php\executable\php.exe -i
载入一个扩展
- 最常见的方式是在 php.ini 配置文件里包含一个 PHP
- 扩展。请注意很多扩展已经在 php.ini 里了,仅需要移除分号来激活它们。
+ 最常见的方式是在 &php.ini; 配置文件里包含一个 PHP
+ 扩展。请注意很多扩展已经在 &php.ini; 里了,仅需要移除分号来激活它们。
- 需要注意,从 PHP 7.2.0 开始,可以直接用扩展的名称,来替代扩展的文件名。这样配置文件就跟操作系统解耦了,也更容易理解。我们推荐采用此方式加载扩展。为了与之前的版本保持兼容,直接写扩展名的方式会仍然支持。
+ 需要注意,从 PHP 7.2.0 开始,可以直接用扩展的名称,来替代扩展的文件名。这样配置文件就跟操作系统解耦了,也更容易理解。推荐采用此方式加载扩展。为了与之前的版本保持兼容,直接写扩展名的方式会仍然支持。
-
+
-
-
+
+
-
-
+
+
-
+
不过呢,有些 web 服务器会搞混,因为其并不一定使用和 PHP
- 可执行文件处于同一目录下的 php.ini
- 文件。要搞清楚具体使用了哪一个 php.ini
+ 可执行文件处于同一目录下的 &php.ini;
+ 文件。要搞清楚具体使用了哪一个 &php.ini;
文件,在 phpinfo 的输出中查看:
-
+
+
-
-
+
+
-
-
+
- 激活一个扩展后,保存 php.ini
+ 激活一个扩展后,保存 &php.ini;
文件并重启动 web 服务器,然后用
phpinfo 再次查看确定。新的扩展应该有其自己的一节。
@@ -259,25 +249,25 @@ Loaded Configuration File C:\Program Files\PHP\5.2\php.ini
中显示,应该查看日志以确定问题出在哪里。
- 如果是在命令行使用 PHP(CLI),扩展加载出错信息会直接在屏幕显示。
+ 如果是在命令行中(CLI)使用 PHP,扩展加载出错信息会直接在屏幕显示。
如果在 web 服务器中使用 PHP,则日志文件的位置与格式各不相同。请阅读所使用的
web 服务器之文档以确定日志文件的位置,这与 PHP 本身并无关系。
- 最常见的问题是 DLL 和 DLL 依赖的文件的位置,php.ini
- 中“extension_dir”设定的值,以及编译时的设置不匹配。
+ 最常见的问题是 DLL 和 DLL 依赖的文件的位置,&php.ini;
+ 中“extension_dir”设置的值,以及编译时的设置不匹配。
如果问题出在编译时设置不匹配,那可能所下载的 DLL
- 文件不对。可以尝试重新下载一个设置匹配的扩展。此外,phpinfo
+ 文件不对。可以尝试使用正确的设置重新下载扩展。此外,phpinfo
可以起到很大帮助。
-
+
-
+
用 PEAR 编译共享 PECL 扩展库
@@ -296,7 +286,7 @@ Loaded Configuration File C:\Program Files\PHP\5.2\php.ini
中。然后 extname.so 就可以通过 &php.ini; 加载了。
- 默认情况下,pecl 命令不会安装标记为
+ 默认情况下,pecl 命令不会安装标记为
alpha 或
beta 状态的包。如果没有 stable
包可用,也可以用以下命令安装一个 beta 包:
@@ -316,7 +306,7 @@ Loaded Configuration File C:\Program Files\PHP\5.2\php.ini
- 在 &php.ini; 中激活扩展之后,需要重新启动 web 服务以使更改生效。
+ 在 &php.ini; 中启用扩展之后,需要重新启动 web 服务以使更改生效。
@@ -324,12 +314,12 @@ Loaded Configuration File C:\Program Files\PHP\5.2\php.ini
用 phpize 编译共享 PECL 扩展库
- 有时候不能用 pecl
- 安装命令。这可能是因为在防火墙后面,或者是因为想要安装的扩展库还没有
- PECL 兼容的包,例如 Git 中尚未发布的扩展库。如果要编译这种扩展库,可以用更底层的编译工具来手工进行编译。
+ 有时候不能用 pecl
+ 安装命令。这可能是因为存在防火墙,或者要安装的扩展不可用作
+ PECL 兼容的包,例如 Git 中尚未发布的扩展库。如果要编译这种扩展,可以用更底层的编译工具来手工进行编译。
- phpize 命令是用来准备 PHP
+ phpize 命令是用来准备 PHP
扩展库的编译环境的。下面例子中,扩展库的源程序位于
extname 目录中:
@@ -351,30 +341,32 @@ $ make
这一行之后才能使用此扩展库。
- 如果系统中没有 phpize 命令并且使用了预编译的包(例如
+ 如果系统中没有 phpize 命令并且使用了预编译的包(例如
RPM),那要安装 PHP 包相应的开发版本,此版本通常包含了
- phpize 命令以及相应的用于编译 PHP 及其扩展库的头文件。
+ phpize 命令以及用于编译 PHP 及其扩展库的正确头文件。
使用 phpize --help 命令可以显示此命令用法。
-
+
- php-config
+
+ php-config
+
- php-config 是一个简单的命令行脚本用于获取所安装的 PHP 配置的信息。
+ php-config 是一个简单的命令行脚本用于获取所安装的 PHP 配置的信息。
在编译扩展时,如果安装有多个 PHP 版本,可以在配置时用
- --with-php-config 选项来指定使用哪一个版本编译,该选项指定了相对应的
- php-config 脚本的路径。
+ 选项来指定使用哪一个版本编译,设置相应
+ php-config 脚本的路径。
- php-config 脚本在命令行所能使用的选项可以通过 选项来显示:
+ php-config 脚本在命令行所能使用的选项可以通过 选项来查询:
--includes
- 列出用 -I 选项包含的所有文件
+
+ 列出用 -I 选项包含的所有文件
+ --ldflags
- PHP 编译时所使用的 LD 标志
+
+ PHP 编译时所使用的 LD flag
+ --libs
@@ -427,7 +423,9 @@ Options:
--include-dir
- 头文件的默认路径前缀
+
+ 头文件的默认路径前缀
+ --php-binary
@@ -439,7 +437,9 @@ Options:
--configure-options
- 重现当前 PHP 在编译时的配置选项
+
+ 重现当前 PHP 在编译时的配置选项
+ --version
@@ -458,14 +458,14 @@ Options:
将 PECL 扩展库静态编译入 PHP
- 有时可能需要将扩展库静态编译到 PHP 中。这需要将扩展库源程序放入
- /your/phpsrcdir/ext/ 目录中去并告诉 PHP
- 编译系统来生成其配置脚本。
+ 可能需要将扩展库静态编译到 PHP 中。这需要将扩展库源码放入
+ /path/to/php/src/dir/ext/ 目录中,去使用 PHP
+ 编译系统来重新生成其 configure 脚本。
- /your/phpsrcdir/ext/extname
+ /path/to/php/src/dir/ext/extname
- 此时强制 PHP 重新生成配置脚本,然后正常编译 PHP:
+ 此时 PHP 需要强制重新生成配置脚本,然后正常编译 PHP:
- $ cd /your/phpsrcdir
- $ rm configure
- $ ./buildconf --force
- $ ./configure --help
- $ ./configure --with-extname --enable-someotherext --with-foobar
- $ make
- $ make install
+$ cd /path/to/php/src/dir
+$ rm configure
+$ ./buildconf --force
+$ ./configure --help
+$ ./configure --with-extname --enable-someotherext --with-foobar
+$ make
+$ make install
- 要运行“buildconf”脚本,需要 autoconf 2.13 和 automake 1.4+(更新版本的
- autoconf 也许能工作,但不被支持)。
+ 要运行 buildconf 脚本,需要 autoconf
+ 2.68 和 automake
+ 1.4+。更高版本的
+ autoconf 也许能工作,但不被支持。
- 是否用 --enable-extname 或 --with-extname
+ 是否用 或
取决于扩展库。通常不需要外部库文件的扩展库使用
- --enable。要确认的话,在 buildconf 之后运行:
+ 。当然,在 buildconf 之后运行:
@@ -511,7 +513,7 @@ $ mv extname-x.x.x extname
-
+
-
+
&reftitle.runtime;
&extension.runtime;
@@ -27,13 +27,13 @@
memcached.sess_consistent_hashOnPHP_INI_ALL
- 自 memcached 2.1.0 起可用。自 memcached 3.0.0 起默认值为 On。
+ 自 memcached 2.1.0 起可用。自 memcached 3.0.0 起默认值为 On。memcached.sess_binaryOffPHP_INI_ALL
- 自 memcached 2.0.0 起可用。自 memcached 3.0.0 起改用 memcached.sess_binary_protocol。
+ 自 memcached 2.0.0 起可用。自 memcached 3.0.0 起改用 memcached.sess_binary_protocol。memcached.sess_lock_wait
@@ -63,7 +63,7 @@
memcached.sess_remove_failedOnPHP_INI_ALL
- 自 memcached 2.1.0 起可用。自 memcached 3.0.0 起改用 memcached.sess_remove_failed_servers。
+ 自 memcached 2.1.0 起可用。自 memcached 3.0.0 起改用 memcached.sess_remove_failed_servers。memcached.compression_type
@@ -117,7 +117,7 @@
memcached.sess_binary_protocolOnPHP_INI_ALL
- 自 memcached 3.0.0 起可用。替换 memcached.sess_binary。
+ 自 memcached 3.0.0 起可用。替换 memcached.sess_binary。memcached.sess_connect_timeout
@@ -147,13 +147,13 @@
memcached.sess_lock_wait_max150PHP_INI_ALL
- 自 memcached 3.0.0 起可用。自 memcached 3.1.0 起默认值为 150(之前 2000)。
+ 自 memcached 3.0.0 起可用。自 memcached 3.1.0 起默认值为 150(之前 2000)。memcached.sess_lock_wait_min150PHP_INI_ALL
- 自 memcached 3.0.0 起可用。自 memcached 3.1.0 起默认值为 150(之前 1000)。
+ 自 memcached 3.0.0 起可用。自 memcached 3.1.0 起默认值为 150(之前 1000)。memcached.sess_persistent
@@ -165,7 +165,7 @@
memcached.sess_remove_failed_serversOffPHP_INI_ALL
- 自 memcached 3.0.0 起可用。替换 memcached.sess_remove_failed。
+ 自 memcached 3.0.0 起可用。替换 memcached.sess_remove_failed。memcached.sess_server_failure_limit
@@ -209,7 +209,7 @@
- 开启 session 支持。有效值: On、Off,默认值 On。
+ 开启 session 支持。有效值: On、Off,默认值 On。
@@ -220,9 +220,9 @@
- 如果为 On,session 处理程序则使用一致性哈希(libketama)。
+ 如果为 On,session 处理程序则使用一致性哈希(libketama)。
使用一致性哈希,可以保证你在增加或删除 memcached 服务器节点的时候不会导致 session 大规模的失效。
- 默认是 On。
+ 默认是 On。
@@ -233,7 +233,7 @@
- Memcached session 是否使用二进制模式。如果 Libmemcached 开启二进制模式。默认值是 Off。
+ Memcached session 是否使用二进制模式。如果 Libmemcached 开启二进制模式。默认值是 Off。
@@ -244,7 +244,7 @@
- Session 自旋锁等待时间(微秒)。请小心设置此值。值的类型是整数,当此值被设置为 0 的时候,lock wait 的时间将会使用系统默认值,Memcached 扩展中默认值是 150000。
+ Session 自旋锁等待时间(微秒)。请小心设置此值。值的类型是整数,当此值被设置为 0 的时候,lock wait 的时间将会使用系统默认值,Memcached 扩展中默认值是 150000。
@@ -255,7 +255,7 @@
- 设置 memcached session key 的前缀。session 前缀最长为 219 字节长的字符串。默认值是 “memc.sess.key.”。
+ 设置 memcached session key 的前缀。session 前缀最长为 219 字节长的字符串。默认值是 memc.sess.key。
@@ -266,7 +266,12 @@
- Write data to a number of additional memcached servers. This is "poor man's HA" as libmemcached calls it. If this value is positive and sess_remove_failed_servers is enabled when a memcached server fails the session will continue to be available from a replica. However, if the failed memcache server becomes available again it will read the session from there which could have old data or no data at all. Default is 0.
+ Write data to a number of additional memcached servers. This is "poor man's HA" as libmemcached calls it.
+ If this value is positive and sess_remove_failed_servers is enabled
+ when a memcached server fails the session will continue to be available from a replica.
+ However, if the failed memcache server becomes available again it will read the session
+ from there which could have old data or no data at all.
+ Default is 0.
@@ -299,7 +304,7 @@
- 设置 memcached 的压缩类型,允许的值为 fastlz、zlib。默认值是 fastlz(快速无损压缩,性能不错)。
+ 设置 memcached 的压缩类型,允许的值为 fastlz、zlib。默认值是 fastlz(快速无损压缩,性能不错)。
@@ -310,7 +315,7 @@
- 压缩因子。保存时压缩因子超过设置的极限才会将数据压缩存储。存储压缩条件:plain_len > comp_len * factor。默认是 1.3 (节省 23% 的空间)。
+ 压缩因子。保存时压缩因子超过设置的极限才会将数据压缩存储。存储压缩条件:plain_len > comp_len * factor。默认是 1.3(节省 23% 的空间)。
@@ -321,7 +326,7 @@
- 压缩阈值。不压缩的序列化值低于此阈值。默认值是 2000 字节。
+ 压缩阈值。不压缩的序列化值低于此阈值。默认值是 2000 字节。
@@ -332,7 +337,7 @@
- 设置缓存对象的默认序列化程序。有效值:php、igbinary、json、json_array、msgpack。
+ 设置缓存对象的默认序列化程序。有效值:php、igbinary、json、json_array、msgpack。
@@ -347,7 +352,7 @@
json_array
- json 序列化,但是反序列化的时候返回数组。 自 memcached 2.0.0 起可用。
+ json,但是反序列化的时候返回数组。自 memcached 2.0.0 起可用。
@@ -377,7 +382,7 @@
- 如果 igbinary 有效则默认使用它,然后如果 msgpack 有效则使用它,否则使用 php。
+ 如果 igbinary 有效则默认使用它,然后如果 msgpack 有效则使用它,否则使用 php。
@@ -388,7 +393,7 @@
- 链接 memcached 服务器时启用 SASL 认证。有效值 On、Off。默认值是 Off。
+ 链接 memcached 服务器时启用 SASL 认证。有效值 On、Off。默认值是 Off。
@@ -399,9 +404,9 @@
- 为新连接设置默认 memcached 协议。(如果要为 session 使用配置 memcached 协议,请改用 memcached.sess_binary_protocol)
+ 为新连接设置默认 memcached 协议。(如果要为 session 使用配置 memcached 协议,请改用 memcached.sess_binary_protocol。)
- 如果设置为 On,则默认使用 memcached 二进制协议。如果设置为 Off,则使用 memcached 文本协议。默认为关闭。
+ 如果设置为 On,则默认使用 memcached 二进制协议。如果设置为 Off,则使用 memcached 文本协议。默认为 Off。
@@ -412,9 +417,9 @@
- 为新连接设置默认的 memcached 连接超时。(要为会话配置 memcached 连接超时,请改用 memcached.sess_connect_timeout)
+ 为新连接设置默认的 memcached 连接超时。(要为会话配置 memcached 连接超时,请改用 memcached.sess_connect_timeout。)
- 在非阻塞模式下,这会更改超时值。以毫秒为单位的套接字连接期间。指定 -1 意味着无限超时。指定 0 意味着使用 memcached 库的默认连接超时。默认为 0。
+ 在非阻塞模式下,这会更改超时值。以毫秒为单位的套接字连接期间。指定 -1 意味着无限超时。指定 0 意味着使用 memcached 库的默认连接超时。默认为 0。
@@ -425,9 +430,13 @@
- Sets the default for consistent hashing for new connections. (To configure consistent hashing for session connections, use memcached.sess_consistent_hash instead)
+ Sets the default for consistent hashing for new connections.
+ (To configure consistent hashing for session connections,
+ use memcached.sess_consistent_hash instead.)
- If set to On, consistent hashing (libketama) is used for session handling. When consistent hashing is used, one can add or remove cache node(s) without messing up too much with existing keys default is Off
+ If set to On, consistent hashing (libketama) is used for
+ session handling. When consistent hashing is used, one can add or remove cache node(s)
+ without messing up too much with existing keys default is Off.
@@ -438,8 +447,18 @@
- Use the memcached binary protocol for memcached sessions (Instead of the text protocol) libmemcached replicas work only if binary mode is enabled. However, certain proxies (such as twemproxy) will work only if the binary protocol is disabled. In older versions of php-memcached, this setting was Off and was called memcached.sess_binary. Default is On with libmemcached 1.0.18 or newer. Default is Off with older version.
+ Use the memcached binary protocol for memcached sessions instead of the text protocol.
+ libmemcached replicas only work if the binary mode is enabled.
+ However, certain proxies (such as twemproxy) will only work if the binary protocol is disabled.
+ Default is On as of libmemcached 1.0.18.
+ Prior to libmemcached 1.0.18, the default was Off.
+
+
+ 在以前的 php-memcached 版本中,此设置称为
+ memcached.sess_binary。
+
+
@@ -450,7 +469,9 @@
memcached connect timeout value
- In non-blocking mode this changes the value of the timeout during socket connection in milliseconds. Specifying -1 means an infinite timeout.
+ In non-blocking mode this changes the value of the timeout
+ during socket connection in milliseconds.
+ Specifying -1 means an infinite timeout.
@@ -461,7 +482,13 @@
- Memcached session consistent hash type. If set to 'ketama', consistent hashing (libketama) is used for session handling (default for php-memcached 3.x) if set to 'ketama_weighted', weighted consistent hashing (libketama) is used for session handling (default for php-memcached 2.x). Default is "ketama".
+ Memcached session consistent hash type.
+ If set to ketama, consistent hashing (libketama)
+ is used for session handling.
+ If set to ketama_weighted, weighted consistent hashing (libketama)
+ is used for session handling.
+ Default is ketama.
+ Prior to php-memcached 3.0, the default was ketama_weighted.
@@ -472,7 +499,10 @@
- The time, in seconds, before a lock should release itself. Setting to 0 results in the default behaviour, which is to use PHP's max_execution_time. Default is 0.
+ The time, in seconds, before a lock should release itself.
+ Setting to 0 results in the default behaviour,
+ which is to use PHP's max_execution_time.
+ Default is 0.
@@ -483,7 +513,8 @@
- The number of times to retry locking the session lock, not including the first attempt. Default is 5.
+ The number of times to retry locking the session lock, not including the first attempt.
+ Default is 5.
@@ -494,7 +525,8 @@
- The maximum time, in milliseconds, to wait between session lock attempts. The default is 150.
+ The maximum time, in milliseconds, to wait between session lock attempts.
+ The default is 150.
@@ -505,7 +537,11 @@
- The minimum time, in milliseconds, to wait between session lock attempts. This value is double on each lock retry until memcached.sess_lock_wait_max is reached, after which any further retries will take sess_lock_wait_max seconds. The default is 150.
+ The minimum time, in milliseconds, to wait between session lock attempts.
+ This value is double on each lock retry until memcached.sess_lock_wait_max is
+ reached, after which any further retries will take
+ memcached.sess_lock_wait_max seconds.
+ The default is 150.
@@ -516,7 +552,10 @@
- Whether or not to re-use the memcached connections corresponding to the value(s) of session.save_path after the execution of the script ends. Don't use this if certain settings (e.g. SASL settings, sess_binary_protocol) would be overridden between requests. Default is Off.
+ Whether or not to re-use the memcached connections corresponding to the value(s) of
+ session.save_path after the execution of the script ends. Don't use this if
+ certain settings (e.g. SASL settings, sess_binary_protocol) would be overridden between requests.
+ Default is Off.
@@ -527,8 +566,14 @@
- Allow failed memcached server to automatically be removed. Default is Off. (In previous versions, this setting was called memcached.sess_remove_failed)
+ 允许自动移除失败的 memcached 服务器。默认值是 Off。
+
+
+ 在以前的 php-memcached 版本中,此设置称为
+ memcached.sess_remove_failed。
+
+
@@ -538,7 +583,9 @@
- Set this value to enable the server be removed after configured number of continuous times connection failure. Default is 0.
+ Set this value to enable the server be removed after
+ configured number of continuous times connection failure.
+ Default is 0.
@@ -550,7 +597,7 @@
Session SASL 密码。
- Both username and password need to be set for SASL to be enabled
+ Both username and password need to be set for SASL to be enabled.
@@ -562,7 +609,7 @@
Session SASL 用户名。
- Both username and password need to be set for SASL to be enabled
+ Both username and password need to be set for SASL to be enabled.
@@ -574,7 +621,10 @@
存储命令失败后的重试次数。
- This mechanism allows transparent fail-over to secondary servers when set/increment/decrement/setMulti operations fail on the desired server in a multi-server environment. The default is 2.
+ This mechanism allows transparent fail-over to secondary servers when
+ set/increment/decrement/setMulti operations fail on
+ the desired server in a multi-server environment.
+ The default is 2.