<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/dba.setup.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'dba.installation.php',
    1 => '安装',
    2 => '安装',
  ),
  'up' => 
  array (
    0 => 'dba.setup.php',
    1 => '安装/配置',
  ),
  'prev' => 
  array (
    0 => 'dba.requirements.php',
    1 => '需求',
  ),
  'next' => 
  array (
    0 => 'dba.configuration.php',
    1 => '运行时配置',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/dba/configure.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="dba.installation" class="section">
 <h2 class="title">安装</h2>
 <p class="simpara">
  By using the <strong class="option configure">--enable-dba=shared</strong>
  configuration option you can build a dynamic loadable module to enable PHP
  for basic support of dbm-style databases. You also have to add support
  for at least one of the following handlers by specifying the
  <strong class="option configure">--with-XXXX</strong> or <strong class="option configure">--enable-XXXX</strong> configure switch to your PHP
  configure line.
 </p>
 <div class="warning"><strong class="warning">警告</strong>
  <p class="simpara">
   After configuring and compiling PHP you must execute the following test
   from commandline: <code class="literal">php run-tests.php ext/dba</code>. This shows
   whether your combination of handlers works. Most problematic are
   <code class="literal">dbm</code> and <code class="literal">ndbm</code> which conflict with
   many installations. The reason for this is that on several systems these
   libraries are part of more than one other library. The configuration test
   only prevents you from configuring malfunctioning single handlers but not
   combinations.
  </p>
 </div>
 <table class="doctable table">
  <caption><strong>Supported DBA handlers</strong></caption>
  
   <thead>
    <tr>
     <th>Handler</th>
     <th>Configure Switch</th>
    </tr>

   </thead>

   <tbody class="tbody">
    <tr>
     <td><code class="literal">dbm</code></td>
     <td>
      <p class="para">
      To enable support for dbm add
      <strong class="option configure">--with-dbm[=DIR]</strong>.
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <span class="simpara">
        dbm normally is a wrapper which often results in failures.
        This means you should only use dbm if you are sure it works
        and if you really need this format.
       </span>
      </p></blockquote>
      </p>
     </td>
    </tr>


    <tr>
     <td><code class="literal">ndbm</code></td>
     <td>
      <p class="para">
      To enable support for ndbm add
      <strong class="option configure">--with-ndbm[=DIR]</strong>.
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <span class="simpara">
        ndbm normally is a wrapper which often results in failures.
        This means you should only use ndbm if you are sure it works
        and if you really need this format.
       </span>
      </p></blockquote>
      </p>
     </td>
    </tr>


    <tr>
     <td><code class="literal">gdbm</code></td>
     <td>
      To enable support for gdbm add
      <strong class="option configure">--with-gdbm[=DIR]</strong>.
     </td>
    </tr>


    <tr>
     <td><code class="literal">db2</code></td>
     <td>
      <p class="para">
      To enable support for Oracle Berkeley DB 2 add
      <strong class="option configure">--with-db2[=DIR]</strong>.
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <span class="simpara">
        db2 conflicts with db3 and db4.
       </span>
      </p></blockquote>
      </p>
     </td>
    </tr>


    <tr>
     <td><code class="literal">db3</code></td>
     <td>
      <p class="para">
      To enable support for Oracle Berkeley DB 3 add
      <strong class="option configure">--with-db3[=DIR]</strong>.
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <span class="simpara">
        db3 conflicts with db2 and db4.
       </span>
      </p></blockquote>
      </p>
     </td>
    </tr>


    <tr>
     <td><code class="literal">db4</code></td>
     <td>
      <p class="para">
      To enable support for Oracle Berkeley DB 4 or 5 add
      <strong class="option configure">--with-db4[=DIR]</strong>.
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <span class="simpara">
        db4 conflicts with db2 and db3.
       </span>
      </p></blockquote>
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <span class="simpara">
        The db libraries with
        versions 4.1 through 4.1.24 cannot be used in any PHP version.
       </span>
       <span class="simpara">
        Support for BDB 5 was added in PHP 5.3.3.
       </span>
      </p></blockquote>
     </p>
     </td>
    </tr>


    <tr>
     <td><code class="literal">cdb</code></td>
     <td>
      <p class="para">
      To enable support for cdb add
      <strong class="option configure">--with-cdb[=DIR]</strong>.
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <span class="simpara">
        You can omit DIR to use the bundled cdb library
        that adds the cdb_make handler which allows creation of cdb files
        and allows to access cdb files on the network using PHP&#039;s streams.
       </span>
      </p></blockquote>
      </p>
     </td>
    </tr>


    <tr>
     <td><code class="literal">flatfile</code></td>
     <td>
      <p class="para">
      To enable support for flatfile add
      <strong class="option configure">--enable-flatfile</strong>.
      Before PHP 5.2.1 the <strong class="option configure">--with-flatfile</strong>
      had to be used instead.
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <span class="simpara">
        This was added to add compatibility with deprecated
        <code class="literal">dbm</code> extension. Use this handler only
        when you cannot install one of the libraries required by the other
        handlers and when you cannot use bundled cdb handler.
       </span>
      </p></blockquote>
      </p>
     </td>
    </tr>


    <tr>
     <td><code class="literal">inifile</code></td>
     <td>
      <p class="para">
      To enable support for <code class="literal">inifile</code> add
      <strong class="option configure">--enable-inifile</strong>.
      Before PHP 5.2.1 the <strong class="option configure">--with-inifile</strong>
      had to be used instead.
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <span class="simpara">
        This was added to allow to read and set microsoft style
        <var class="filename">.ini</var> files (like the <var class="filename">php.ini</var> file).
       </span>
      </p></blockquote>
      </p>
     </td>
    </tr>


    <tr>
     <td><code class="literal">qdbm</code></td>
     <td>
      <p class="para">
      To enable support for qdbm add
      <strong class="option configure">--with-qdbm[=DIR]</strong>.
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <span class="simpara">
        qdbm conflicts with dbm and gdbm.
       </span>
      </p></blockquote>
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <span class="simpara">
        The qdbm library can be downloaded from
        <a href="http://fallabs.com/qdbm/index.html" class="link external">&raquo;&nbsp;http://fallabs.com/qdbm/index.html</a>.
       </span>
      </p></blockquote>
      </p>
     </td>
    </tr>


    <tr>
     <td><code class="literal">tcadb</code></td>
     <td>
      <p class="para">
      To enable support for Tokyo Cabinet add
      <strong class="option configure">--with-tcadb[=DIR]</strong>.
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <span class="simpara">
        The Tokyo Cabinet library can be downloaded from
        <a href="http://fallabs.com/tokyocabinet/" class="link external">&raquo;&nbsp;http://fallabs.com/tokyocabinet/</a>.
       </span>
      </p></blockquote>
      </p>
     </td>
    </tr>


    <tr>
     <td><code class="literal">lmdb</code></td>
     <td>
      <p class="para">
      To enable support for the Lightning Memory-Mapped Database add
      <strong class="option configure">--with-lmdb[=DIR]</strong>.
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <span class="simpara">
        This was added in PHP 7.2.0. The Lightning Memory-Mapped Database
        library can be downloaded from <a href="https://symas.com/lmdb/" class="link external">&raquo;&nbsp;https://symas.com/lmdb/</a>.
       </span>
      </p></blockquote>
      </p>
     </td>
    </tr>


   </tbody>
  
 </table>

</div><?php manual_footer($setup); ?>