-
Notifications
You must be signed in to change notification settings - Fork 788
/
Copy pathsetup.xml
167 lines (148 loc) · 5.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<chapter xml:id="mysql-xdevapi.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.setup;
<section xml:id="mysql-xdevapi.requirements">
&reftitle.required;
<para>
This extension requires a MySQL 8+ server with the X plugin
enabled (default).
</para>
<para>
Prerequisite libraries for compiling this extension are:
Boost (1.53.0 or higher), OpenSSL, and Protobuf.
</para>
</section>
<section xml:id="mysql-xdevapi.installation">
&reftitle.install;
<para>
&pecl.moved;
</para>
<para>
An example installation procedure on Ubuntu 18.04 with PHP 7.2:
</para>
<programlisting>
<![CDATA[
// Dependencies
$ apt install build-essential libprotobuf-dev libboost-dev openssl protobuf-compiler liblz4-tool zstd
// PHP with the desired extensions; php7.2-dev is required to compile
$ apt install php7.2-cli php7.2-dev php7.2-mysql php7.2-pdo php7.2-xml
// Compile the extension
$ pecl install mysql_xdevapi
]]>
</programlisting>
<para>
The <literal>pecl install</literal> command does not enable PHP extensions (by default)
and enabling PHP extensions can be done in several ways.
Another PHP 7.2 on Ubuntu 18.04 example:
</para>
<programlisting>
<![CDATA[
// Create its own ini file
$ echo "extension=mysql_xdevapi.so" > /etc/php/7.2/mods-available/mysql_xdevapi.ini
// Use the 'phpenmod' command (note: it's Debian/Ubuntu specific)
$ phpenmod -v 7.2 -s ALL mysql_xdevapi
// A 'phpenmod' alternative is to manually symlink it
// $ ln -s /etc/php/7.2/mods-available/mysql_xdevapi.ini /etc/php/7.2/cli/conf.d/20-mysql_xdevapi.ini
// Let's see which MySQL extensions are enabled now
$ php -m |grep mysql
mysql_xdevapi
mysqli
mysqlnd
pdo_mysql
]]>
</programlisting>
<para>
&pecl.info;
<link xlink:href="&url.pecl.package;mysql_xdevapi">&url.pecl.package;mysql_xdevapi</link>.
</para>
</section>
<!-- {{{ Configuration -->
&reference.mysql-xdevapi.ini;
<!-- }}} -->
<section xml:id="mysql-xdevapi.build">
<title>Building / Compiling From Source</title>
<para>
Considerations for compiling this extension from source.
</para>
<itemizedlist>
<listitem>
<para>
The extension name is 'mysql_xdevapi', so use <literal>--enable-mysql-xdevapi</literal>.
</para>
</listitem>
<listitem>
<para>
Boost: required, optionally use the --with-boost=DIR configure option
or set the MYSQL_XDEVAPI_BOOST_ROOT environment variable. Only the
boost header files are required; not the binaries.
</para>
</listitem>
<listitem>
<para>
Google Protocol Buffers (protobuf): required, optionally use the --with-protobuf=DIR
configure option or set the MYSQL_XDEVAPI_PROTOBUF_ROOT environment variable.
</para>
<para>
Optionally use <literal>make protobufs</literal> to generate protobuf files (*.pb.cc/.h),
and <literal>make clean-protobufs</literal> to delete generate protobuf files.
</para>
<para>
Windows specific protobuf note: depending on your environment,
the static library with a multi-threaded DLL runtime may be needed.
To prepare, use the following options:
<emphasis>-Dprotobuf_MSVC_STATIC_RUNTIME=OFF -Dprotobuf_BUILD_SHARED_LIBS=OFF</emphasis>
</para>
</listitem>
<listitem>
<para>
Google Protocol Buffers / protocol compiler (protoc): required, ensure that proper
'protoc' is available in the PATH while building. It is especially
important as Windows PHP SDK batch scripts may overwrite the environment.
</para>
</listitem>
<listitem>
<para>
Bison: required, and available from the PATH.
</para>
<para>
Windows specific bison note: we strongly recommended that bison delivered with the
chosen PHP SDKis used else an error similar to "zend_globals_macros.h(39):
error C2375: 'zendparse': redefinition; different linkage
Zend/zend_language_parser.h(214): note: see declaration of 'zendparse'" may
be the result. Also, Windows PHP SDK batch scripts may overwrite the environment.
</para>
</listitem>
<listitem>
<para>
Windows Specific Notes: To prepare the environment, see the official
Windows build documentation for
<link xlink:href="&url.php.win.build2;">the current SDK</link>.
</para>
<para>
We recommend using the backslash '\\' instead of a slash '/' for all paths.
</para>
</listitem>
</itemizedlist>
</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
-->