<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc'; $TOC = array(); $TOC_DEPRECATED = array(); $PARENTS = array(); include_once dirname(__FILE__) ."/toc/install.pecl.inc"; $setup = array ( 'home' => array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'install.pecl.pear.php', 1 => 'Compiling shared PECL extensions with the pecl command', ), 'up' => array ( 0 => 'install.pecl.php', 1 => 'Installation of PECL extensions', ), 'prev' => array ( 0 => 'install.pecl.windows.php', 1 => 'Installing a PHP extension on Windows', ), 'next' => array ( 0 => 'install.pecl.phpize.php', 1 => 'Compiling shared PECL extensions with phpize', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'install/pecl.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?> <div id="install.pecl.pear" class="sect1"> <h2 class="title">Compiling shared PECL extensions with the pecl command</h2> <p class="simpara"> PECL makes it easy to create shared PHP extensions. Using the <a href="https://pear.php.net/manual/en/guide.users.commandline.cli.php" class="link external">» pecl command</a>, do the following: </p> <div class="example-contents screen"> <div class="cdata"><pre> $ pecl install extname </pre></div> </div> <p class="simpara"> This will download the source for <em>extname</em>, compile, and install <var class="filename">extname.so</var> into the <a href="ini.core.php#ini.extension-dir" class="link">extension_dir</a>. <var class="filename">extname.so</var> may then be loaded via <var class="filename">php.ini</var>. </p> <p class="simpara"> By default, the <strong class="command">pecl</strong> command will not install packages that are marked with the <code class="literal">alpha</code> or <code class="literal">beta</code> state. If no <code class="literal">stable</code> packages are available, a <code class="literal">beta</code> package may be installed using the following command: </p> <div class="example-contents screen"> <div class="cdata"><pre> $ pecl install extname-beta </pre></div> </div> <p class="para"> A specific version may also be installed using this variant: </p> <div class="example-contents screen"> <div class="cdata"><pre> $ pecl install extname-0.1 </pre></div> </div> <blockquote class="note"><p><strong class="note">Nota</strong>: <p class="para"> After enabling the extension in <var class="filename">php.ini</var>, restarting the web service is required for the changes to be picked up. </p> </p></blockquote> </div><?php manual_footer($setup); ?>