-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathsetup.xml
61 lines (57 loc) · 2.17 KB
/
setup.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 9a157412627e3f6dbadd76daaf20fb4011393a10 Maintainer: yuanyuqiang Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<chapter xml:id="pthreads.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.setup;
<section xml:id="pthreads.requirements">
&reftitle.required;
<para>
要使用 pthreads 扩展,需要构建 PHP 时启用 ZTS(Zend 线程安全)(<option role="configure">--enable-zts</option> 或在
PHP 8.0 之前的非 Windows 平台为 <option role="configure">--enable-maintainer-zts</option>)。
</para>
<caution>
<para>
ZTS 是构建期配置选项,只能通过构建时通过选项启用,无法在构建之后启用。
</para>
</caution>
<para>
要构建 pthreads 扩展,你需要启用了 ZTS 的 PHP 以及 Posix Threads 头文件(pthread.h)。对于 Windows 平台,需要使用 redhat 的 pthread-w32 项目中的 pthread.h 头文件。
</para>
</section>
<section xml:id="pthreads.installation">
&reftitle.install;
<para>
pthreads 扩展由 PECL 主持,使用 <link xlink:href="&url.git.hub;krakjoe/pthreads">github</link> 管理源代码。
使用标准的 PECL 包安装方式就可以完成安装:<link xlink:href="&url.pecl.package;pthreads">&url.pecl.package;pthreads</link>。
</para>
<para>
Windows 用户可以从 <link xlink:href="&url.pecl.package;pthreads">PECL</link> 下载已经构建的二进制发行包。
</para>
<caution>
<para>
Windows 用户需要将 pthreadVC2.dll (包含在 Windows 版二进制发行包中)所在路径加入到 <envar>PATH</envar> 环境变量中。
</para>
</caution>
</section>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->