<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Installation</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mysql-xdevapi.requirements.html">Requirements</a></div> <div class="next" style="text-align: right; float: right;"><a href="mysql-xdevapi.configuration.html">Runtime Configuration</a></div> <div class="up"><a href="mysql-xdevapi.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="mysql-xdevapi.installation" class="section"> <h2 class="title">Installation</h2> <p class="para"> This <a href="http://pecl.php.net/" class="link external">» PECL</a> extension is not bundled with PHP. </p> <p class="para"> An example installation procedure on Ubuntu 18.04 with PHP 7.2: </p> <div class="example-contents"> <div class="cdata"><pre> // Dependencies $ apt install build-essential libprotobuf-dev libboost-dev openssl protobuf-compiler // 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 </pre></div> </div> <p class="para"> The <em>pecl install</em> 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: </p> <div class="example-contents"> <div class="cdata"><pre> // 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 </pre></div> </div> <p class="para"> Information for installing this PECL extension may be found in the manual chapter titled <a href="install.pecl.html" class="link">Installation of PECL extensions</a>. Additional information such as new releases, downloads, source files, maintainer information, and a CHANGELOG, can be located here: <a href="http://pecl.php.net/package/apc" class="link external">» http://pecl.php.net/package/mysql_xdevapi</a>. </p> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mysql-xdevapi.requirements.html">Requirements</a></div> <div class="next" style="text-align: right; float: right;"><a href="mysql-xdevapi.configuration.html">Runtime Configuration</a></div> <div class="up"><a href="mysql-xdevapi.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>