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

contributors($setup);

?>
<div id="ibm-db2.configuration" class="section">
 <h2 class="title">运行时配置</h2>
 <p class="simpara">
这些函数的行为受 <var class="filename">php.ini</var> 中的设置影响。
</p>
 <table class="doctable table">
  <caption><strong>ibm_db2 配置选项</strong></caption>
  
   <thead>
    <tr>
     <th>名字</th>
     <th>默认</th>
     <th>可修改范围</th>
     <th>更新日志</th>
    </tr>

   </thead>

   <tbody class="tbody">
    <tr>
     <td><a href="ibm-db2.configuration.php#ini.ibm-db2.binmode" class="link">ibm_db2.binmode</a></td>
     <td>&quot;1&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="ibm-db2.configuration.php#ini.ibm-db2.i5-all-pconnect" class="link">ibm_db2.i5_all_pconnect</a></td>
     <td>&quot;0&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
     <td>Available as of ibm_db2 1.6.5.</td>
    </tr>

    <tr>
     <td><a href="ibm-db2.configuration.php#ini.ibm-db2.i5-allow-commit" class="link">ibm_db2.i5_allow_commit</a></td>
     <td>&quot;0&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
     <td>Available as of ibm_db2 1.4.9.</td>
    </tr>

    <tr>
     <td><a href="ibm-db2.configuration.php#ini.ibm-db2.i5-blank-userid" class="link">ibm_db2.i5_blank_userid</a></td>
     <td>&quot;0&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
     <td>Available as of ibm_db2 1.9.7.</td>
    </tr>

    <tr>
     <td><a href="ibm-db2.configuration.php#ini.ibm-db2.i5-char-trim" class="link">ibm_db2.i5_char_trim</a></td>
     <td>&quot;0&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
     <td>Available as of ibm_db2 2.1.0.</td>
    </tr>

    <tr>
     <td><a href="ibm-db2.configuration.php#ini.ibm-db2.i5-dbcs-alloc" class="link">ibm_db2.i5_dbcs_alloc</a></td>
     <td>&quot;0&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
     <td>Available as of ibm_db2 1.5.0.</td>
    </tr>

    <tr>
     <td><a href="ibm-db2.configuration.php#ini.ibm-db2.i5-guard-profile" class="link">ibm_db2.i5_guard_profile</a></td>
     <td>&quot;0&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
     <td>Available as of ibm_db2 1.9.7.</td>
    </tr>

    <tr>
     <td><a href="ibm-db2.configuration.php#ini.ibm-db2.i5-ignore-userid" class="link">ibm_db2.i5_ignore_userid</a></td>
     <td>&quot;0&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
     <td>Available as of ibm_db2 1.8.0.</td>
    </tr>

    <tr>
     <td><a href="ibm-db2.configuration.php#ini.ibm-db2.i5-job-sort" class="link">ibm_db2.i5_job_sort</a></td>
     <td>&quot;0&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
     <td>Available as of ibm_db2 1.8.4.</td>
    </tr>

    <tr>
     <td><a href="ibm-db2.configuration.php#ini.ibm-db2.i5-log-verbose" class="link">ibm_db2.i5_log_verbose</a></td>
     <td>&quot;0&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
     <td>Available as of ibm_db2 1.9.7.</td>
    </tr>

    <tr>
     <td><a href="ibm-db2.configuration.php#ini.ibm-db2.i5-max-pconnect" class="link">ibm_db2.i5_max_pconnect</a></td>
     <td>&quot;0&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
     <td>Available as of ibm_db2 1.9.7.</td>
    </tr>

    <tr>
     <td><a href="ibm-db2.configuration.php#ini.ibm-db2.i5-override-ccsid" class="link">ibm_db2.i5_override_ccsid</a></td>
     <td>&quot;0&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
     <td>Available as of ibm_db2 1.9.7.</td>
    </tr>

    <tr>
     <td><a href="ibm-db2.configuration.php#ini.ibm-db2.i5-servermode-subsystem" class="link">ibm_db2.i5_servermode_subsystem</a></td>
     <td>NULL</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
     <td>Available as of ibm_db2 1.9.7.</td>
    </tr>

    <tr>
     <td><a href="ibm-db2.configuration.php#ini.ibm-db2.i5-sys-naming" class="link">ibm_db2.i5_sys_naming</a></td>
     <td>&quot;0&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
     <td>Available as of ibm_db2 1.9.7.</td>
    </tr>

    <tr>
     <td><a href="ibm-db2.configuration.php#ini.ibm-db2.instance-name" class="link">ibm_db2.instance_name</a></td>
     <td>NULL</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
     <td>Available as of ibm_db2 1.0.2.</td>
    </tr>

   </tbody>
  
 </table>


 <p class="para">这是配置指令的简短说明。</p>

 <dl>
  
   <dt id="ini.ibm-db2.binmode">
    <code class="parameter">ibm_db2.binmode</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <p class="para">
     This option controls the mode used for converting to and from binary
     data in the PHP application.
     <ul class="itemizedlist">
      <li class="listitem">
       <span class="simpara">
        1 (DB2_BINARY)
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        2 (DB2_CONVERT)
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        3 (DB2_PASSTHRU)
       </span>
      </li>
     </ul>
    </p>
   </dd>
  
  
   <dt id="ini.ibm-db2.i5-all-pconnect">
    <code class="parameter">ibm_db2.i5_all_pconnect</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <p class="para">
     This option forces all connections to be persistent on IBM i.
     Basically, all <span class="function"><a href="function.db2-connect.php" class="function">db2_connect()</a></span> calls transparently become
     <span class="function"><a href="function.db2-pconnect.php" class="function">db2_pconnect()</a></span> calls.
     By default, this option is <code class="literal">0</code>.
     This option is provided as a convenience for cases where persistent
     connections are faster.
     It should not be used in new applications.
     <ul class="itemizedlist">
      <li class="listitem">
       <span class="simpara">
        0  - Persistent and non-persistent connections can be made.
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        1 - All connections are persistent.
       </span>
      </li>
     </ul>
    </p>
   </dd>
  
  
   <dt id="ini.ibm-db2.i5-allow-commit">
    <code class="parameter">ibm_db2.i5_allow_commit</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <p class="para">
     This option controls the transaction isolation mode used.
     By default, this option is <code class="literal">0</code>, so commitment control isn&#039;t used.
     This option can be overridden when connecting if the array key
     <code class="parameter">i5_commit</code> is set in the connection options array
     passed to <span class="function"><a href="function.db2-connect.php" class="function">db2_connect()</a></span> or
     <span class="function"><a href="function.db2-pconnect.php" class="function">db2_pconnect()</a></span>.
     <ul class="itemizedlist">
      <li class="listitem">
       <span class="simpara">
        0 - commitment control is not used
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        1 - read uncommitted, dirty reads possible.
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        2 - read committed, dirty reads are not possible.
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        3 - repeatable read, dirty reads and non-repeatable reads are not possible
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        4 - serializeable, dirty reads, non-repeatable reads, and phantoms are not possible
       </span>
      </li>
     </ul>
    </p>
   </dd>
  
  
   <dt id="ini.ibm-db2.i5-blank-userid">
    <code class="parameter">ibm_db2.i5_blank_userid</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <p class="para">
     This controls if a blank user ID should be allowed on IBM i.
     By default, this option is <code class="literal">0</code>.
     Unlike <code class="parameter">ibm_db2.i5_ignore_userid</code>, this option
     doesn&#039;t force all user IDs to be empty or change job behaviour, but
     simply allows an empty user ID to be passed, for connecting to Db2 as the
     current user.
     <ul class="itemizedlist">
      <li class="listitem">
       <span class="simpara">
        0 - Don&#039;t allow a blank user ID to be passed.
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        1 - Allow a blank user ID to be passed.
       </span>
      </li>
     </ul>
    </p>
   </dd>
  
  
   <dt id="ini.ibm-db2.i5-char-trim">
    <code class="parameter">ibm_db2.i5_char_trim</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <p class="para">
     This option controls if the end of strings are trimmed on IBM i.
     Since many tables use fixed column sizes padded with spaces, this is
     provided as a convenience.
     By default, this option is <code class="literal">0</code>.
     <ul class="itemizedlist">
      <li class="listitem">
       <span class="simpara">
        0 - Columns are not trimmed.
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        1 - Spaces at the end of returned character columns are removed.
       </span>
      </li>
     </ul>
    </p>
   </dd>
  
  
   <dt id="ini.ibm-db2.i5-dbcs-alloc">
    <code class="parameter">ibm_db2.i5_dbcs_alloc</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <p class="para">
     This options affects the internal buffer allocation strategy on IBM i.
     By default, this option is <code class="literal">0</code>.
     When this option is set, buffers are allocated with a much larger size,
     in case the database underestimates a string&#039;s size when converting
     between encodings.
     This option uses six times as much memory for buffers (to account for
     the largest possible UTF-8 sequences), but may be needed if truncated
     data is returned.
     <ul class="itemizedlist">
      <li class="listitem">
       <span class="simpara">
        0 - Minimum size buffers are allocated.
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        1 - Larger size buffers are allocated.
       </span>
      </li>
     </ul>
    </p>
   </dd>
  
  
   <dt id="ini.ibm-db2.i5-guard-profile">
    <code class="parameter">ibm_db2.i5_guard_profile</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <p class="para">
     This option checks if the database user profile was switched when
     connecting to a persistent database connection on IBM i, and if so,
     disconnects from the database.
     By default, this option is set to <code class="literal">0</code>.
     <ul class="itemizedlist">
      <li class="listitem">
       <span class="simpara">
        0 - Don&#039;t check for profile swaps.
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        1 - Check for profile swaps and disconnect if so.
       </span>
      </li>
     </ul>
    </p>
   </dd>
  
  
   <dt id="ini.ibm-db2.i5-log-verbose">
    <code class="parameter">ibm_db2.i5_log_verbose</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <p class="para">
     This option sets if SQL diagnostic messages like warnings and errors are
     always sent to the PHP error log on IBM i.
     Normally, only a brief message on failure is sent (such as &quot;statement
     execute failed&quot;) to the PHP error log, as this option is set to
     <code class="literal">0</code> by default.
     Note that you can still and should call i.e.
     <span class="function"><a href="function.db2-stmt-errormsg.php" class="function">db2_stmt_errormsg()</a></span> manually as part of checking if
     functions fail.
     <ul class="itemizedlist">
      <li class="listitem">
       <span class="simpara">
        0 - Only logs brief messages.
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        1 - Logs the SQL diagnostic message in addition to the brief message.
       </span>
      </li>
     </ul>
    </p>
   </dd>
  
  
   <dt id="ini.ibm-db2.i5-ignore-userid">
    <code class="parameter">ibm_db2.i5_ignore_userid</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <p class="para">
     This option ignores the user ID when connecting to the database when
     running on IBM i, and runs SQL/CLI functionality inside of the PHP job,
     instead of a separate job.
     By default, this option is <code class="literal">0</code>.
     When enabled, it no longer uses a separate database server job, and
     always uses the current user profile for the database, ignoring the
     username and password passed to <span class="function"><a href="function.db2-connect.php" class="function">db2_connect()</a></span> and
     <span class="function"><a href="function.db2-pconnect.php" class="function">db2_pconnect()</a></span>.
     <ul class="itemizedlist">
      <li class="listitem">
       <span class="simpara">
        0 - Uses the specified credentials, and use an SQL/CLI server job.
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        1 - Always use blank credentials, and run SQL/CLI in the PHP job.
       </span>
      </li>
     </ul>
    </p>
   </dd>
  
  
   <dt id="ini.ibm-db2.i5-job-sort">
    <code class="parameter">ibm_db2.i5_job_sort</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <p class="para">
     Controls the job sort option on IBM i.
     By default, this option is <code class="literal">0</code>.
     This corresponds to the IBM i SQL/CLI
     <code class="literal">SQL_ATTR_CONN_SORT_SEQUENCE</code> attribute.
     <ul class="itemizedlist">
      <li class="listitem">
       <span class="simpara">
        0 - Uses the <code class="literal">*HEX</code> sort option, sorting by bytes.
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        1 - Uses the job sort sequence set for the PHP job.
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        2 - Uses the job sort sequence set for the database job.
       </span>
      </li>
     </ul>
    </p>
   </dd>
  
  
   <dt id="ini.ibm-db2.i5-max-pconnect">
    <code class="parameter">ibm_db2.i5_max_pconnect</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     This will affect how many times a persistent connection can be reused
     when running on IBM i.
     By default, this is set to <code class="literal">0</code>, which means a persistent
     connection can always be reused.
     This option can help work around issues in a long-running database job
     (i.e. if a procedure is leaking memory), but is obviously not a long-term
     fix.
    </span>
   </dd>
  
  
   <dt id="ini.ibm-db2.i5-override-ccsid">
    <code class="parameter">ibm_db2.i5_override_ccsid</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     The PASE CCSID to use for character conversions from EBCDIC on IBM i.
     By default, this is <code class="literal">0</code>, which will select the default
     PASE job CCSID, which comes from the PASE locale settings.
     For example, setting this to <code class="literal">1208</code> will use UTF-8.
     This should only be modified if the PASE job CCSID isn&#039;t the expected
     CCSID, and the locale cannot be modified.
    </span>
    <span class="simpara">
     To learn more about CCSIDs on IBM i, consult the
     <a href="https://www.ibm.com/docs/en/i/7.5?topic=information-ccsid-reference" class="link external">&raquo;&nbsp;IBM documentation</a>.
     To learn how locales on IBM i PASE are mapped to CCSIDs, consult the
     <a href="https://www.ibm.com/docs/en/i/7.5?topic=ssw_ibm_i_75/apis/pase_locales.html" class="link external">&raquo;&nbsp;IBM documentation</a>.
    </span>
   </dd>
  
  
   <dt id="ini.ibm-db2.i5-sys-naming">
    <code class="parameter">ibm_db2.i5_sys_naming</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <p class="para">
     This option controls the naming mode when connecting to an IBM i system.
     By default, this option is <code class="literal">0</code>.
     The naming mode affects how names are resolved and the allowed syntax for
     names.
     When set to <code class="literal">0</code>, this uses periods to qualify names and
     uses the default library or user ID to resolve names.
     When set to <code class="literal">1</code>, this uses slashes to qualify names and
     uses the job library list to resolve names.
     <ul class="itemizedlist">
      <li class="listitem">
       <span class="simpara">
        0 - Uses the SQL naming mode (&quot;SCHEMA.TABLE&quot;).
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        1 - Uses the system naming mode (&quot;LIBRARY/FILE&quot;).
       </span>
      </li>
     </ul>
    </p>
    <span class="simpara">
     To learn more about naming modes on IBM i, consult the
     <a href="https://www.ibm.com/docs/en/i/7.5?topic=application-naming-distributed-relational-database-objects" class="link external">&raquo;&nbsp;IBM documentation</a>.
    </span>
   </dd>
  
  
   <dt id="ini.ibm-db2.i5-servermode-subsystem">
    <code class="parameter">ibm_db2.i5_servermode-subsystem</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <span class="simpara">
     This option changes which subsystem database server jobs run under on
     IBM i.
     By default, this option is <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>, so jobs will run under the default
     subsystem for QSQSRVR jobs.
    </span>
   </dd>
  
  
   <dt id="ini.ibm-db2.instance-name">
    <code class="parameter">ibm_db2.instance_name</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <p class="para">
     On Linux and UNIX operating systems, this option defines the name of the
     instance to use for cataloged database connections.
     By default, this option is <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>.
     If this option is set, its value overrides the
     <var class="varname">DB2INSTANCE</var> environment variable setting.
    </p>
    <span class="simpara">
     This option is ignored on Windows operating systems.
    </span>
   </dd>
  
 </dl>
</div><?php manual_footer($setup); ?>