<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/pdo.drivers.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'ref.pdo-oci.php',
    1 => 'Oracle PDO ドライバ',
    2 => 'Oracle PDO ドライバ (PDO_OCI)',
  ),
  'up' => 
  array (
    0 => 'pdo.drivers.php',
    1 => 'PDO ドライバ',
  ),
  'prev' => 
  array (
    0 => 'ref.pdo-sqlsrv.connection.php',
    1 => 'PDO_SQLSRV DSN',
  ),
  'next' => 
  array (
    0 => 'ref.pdo-oci.connection.php',
    1 => 'PDO_OCI DSN',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/pdo_oci/reference.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/ref.pdo-oci.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="ref.pdo-oci" class="reference">
  
  <h1 class="title">Oracle PDO ドライバ (PDO_OCI)</h1>
  
  <div class="partintro">
   
   



<div class="section" id="ref.pdo-oci.installation">
 <h2 class="title">インストール手順</h2>
 <p class="para">
  Oracle データベースがPHPと同じマシンにインストールされている場合、
  必要なライブラリはデータベースソフトウェアに既に含まれています。
  PHP が Oracle データベースと違うマシンにある場合、
  フリーの <a href="https://www.oracle.com/database/technologies/instant-client.html" class="link external">&raquo;&nbsp;Oracle インスタントクライアント</a> ライブラリを使ってください。
  詳細は <a href="oci8.requirements.php" class="link">OCI8 のインストール要件</a> のセクションを参照ください。
 </p>
 
 <div class="section" id="pdo-oci.installation.php84">
  <h2 class="title">PHP 8.4</h2>
  <p class="para">
   
この拡張モジュールは <a href="https://pecl.php.net/" class="link external">&raquo;&nbsp;PECL</a> レポジトリに移動
されており、以下のバージョン以降 PHP にバンドルされなくなっています。 PHP 8.4.0
  </p>
  <p class="para">
   この PECL 拡張モジュールをインストールする方法は、
マニュアルの <a href="install.pecl.php" class="link">
PECL 拡張モジュールのインストール</a> という章にあります。
新規リリース・ダウンロード・ソースファイル・管理者情報・CHANGELOG
といった関連する情報については、次の場所にあります。
   <a href="https://pecl.php.net/package/PDO_OCI" class="link external">&raquo;&nbsp;https://pecl.php.net/package/PDO_OCI</a>.
  </p>
 </div>

 <div class="section" id="pdo-oci.installation.phplt84">
  <h2 class="title">PHP &lt; 8.4</h2>
  <p class="para">
   <strong class="option configure">--with-pdo-oci[=DIR]</strong> で
   PDO Oracle OCI 拡張モジュールをインストールします。オプションの <code class="literal">[=DIR]</code>
   には、Oracle のホームディレクトリを指定することができます。
   <code class="literal">[=DIR]</code> のデフォルトは、環境変数
   <var class="varname">$ORACLE_HOME</var> の値です。
  </p>
  <p class="para">
   <strong class="option configure">--with-pdo-oci=instantclient,prefix,version</strong>
   で、Oracle Instant Client <abbr>SDK</abbr> を指定します。prefix および
   version は環境にあわせて設定します。
  </p>
  <p class="para">
   <div class="example-contents screen">
    <div class="cdata"><pre>
// $ORACLE_HOME を使う例
$ ./configure --with-pdo-oci

// OIC for Linux 10.2.0.3 の RPM を /usr プレフィックスで使う例
$ ./configure --with-pdo-oci=instantclient,/usr,10.2.0.3
</pre></div>
   </div>
  </p>
 </div>
</div>


   


<div class="section" id="pdo-oci.constants">
 <h2 class="title">定義済み定数</h2>
 <p class="simpara">このドライバでは以下の定数が定義されて
います。これは拡張モジュールが PHP に組み込まれているか、実行時に動的にロード
されている場合のみ使用可能です。さらに、これらのドライバ固有の定数は
そのドライバを使用している場合にのみ使用されます。
あるドライバ固有の属性を別のドライバで使うと、予期せぬ結果を引き起こします。
もし複数のドライバを使用しているコードを実行している場合、
<span class="function"><a href="pdo.getattribute.php" class="function">PDO::getAttribute()</a></span> で <strong><code><a href="pdo.constants.php#pdo.constants.attr-driver-name">PDO::ATTR_DRIVER_NAME</a></code></strong>
属性を使用することで、使用中のドライバ名を調べることが可能です。</p>
 <dl>
  
  
   <dt id="pdo.constants.oci-attr-action">
    <strong><code><a href="ref.pdo-oci.php#pdo.constants.oci-attr-action">PDO::OCI_ATTR_ACTION</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     データベースセッション上で、アクションを指定する方法を提供します。
    </p>
    <p class="para">
     これが使えるようになった PHP のバージョンは  7.2.16 と 7.3.3 です。
    </p>
   </dd>
  
  
  
   <dt id="pdo.constants.oci-attr-client-info">
    <strong><code><a href="ref.pdo-oci.php#pdo.constants.oci-attr-client-info">PDO::OCI_ATTR_CLIENT_INFO</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     データベースセッション上で、クライアント情報を指定する方法を提供します。
    </p>
    <p class="para">
     これが使えるようになった PHP のバージョンは  7.2.16 と 7.3.3 です。
    </p>
   </dd>
  
  
  
   <dt id="pdo.constants.oci-attr-client-identifier">
    <strong><code><a href="ref.pdo-oci.php#pdo.constants.oci-attr-client-identifier">PDO::OCI_ATTR_CLIENT_IDENTIFIER</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     データベースセッション上で、クライアント識別子を指定する方法を提供します。
    </p>
    <p class="para">
     これが使えるようになった PHP のバージョンは  7.2.16 と 7.3.3 です。
    </p>
   </dd>
  
  
  
   <dt id="pdo.constants.oci-attr-module">
    <strong><code><a href="ref.pdo-oci.php#pdo.constants.oci-attr-module">PDO::OCI_ATTR_MODULE</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     データベースセッション上で、モジュールを指定する方法を提供します。
    </p>
    <p class="para">
     これが使えるようになった PHP のバージョンは  7.2.16 と 7.3.3 です。
    </p>
   </dd>
  

 </dl>
</div>




  </div>

  

 <h2>目次</h2><ul class="chunklist chunklist_reference"><li><a href="ref.pdo-oci.connection.php">PDO_OCI DSN</a> — Oracle データベースに接続する</li></ul>
</div>
<?php manual_footer($setup); ?>