&reftitle.setup;
&reftitle.required; This extension requires a MySQL 8+ server with the X plugin enabled (default). Prerequisite libraries for compiling this extension are: Boost (1.53.0 or higher), OpenSSL, and Protobuf.
&reftitle.install; &pecl.moved; An example installation procedure on Ubuntu 18.04 with PHP 7.2: The pecl install 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: /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 ]]> &pecl.info; &url.pecl.package;mysql_xdevapi.
&reference.mysql-xdevapi.ini;
Building / Compiling From Source Considerations for compiling this extension from source. The extension name is 'mysql_xdevapi', so use --enable-mysql-xdevapi. 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. Google Protocol Buffers (protobuf): required, optionally use the --with-protobuf=DIR configure option or set the MYSQL_XDEVAPI_PROTOBUF_ROOT environment variable. Optionally use make protobufs to generate protobuf files (*.pb.cc/.h), and make clean-protobufs to delete generate protobuf files. 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: -Dprotobuf_MSVC_STATIC_RUNTIME=OFF -Dprotobuf_BUILD_SHARED_LIBS=OFF 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. Bison: required, and available from the PATH. 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. Windows Specific Notes: To prepare the environment, see the official Windows build documentation for the current SDK. We recommend using the backslash '\\' instead of a slash '/' for all paths.