Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions reference/ldap/constants.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 10e6a2b042104bd7481b6c21ddbfda594683e3c4 Maintainer: takagi Status: ready -->
<!-- EN-Revision: 9ade3ccfc8f1fa82f116a2b2c1e5e3f516fb11e7 Maintainer: takagi Status: ready -->
<!-- Credits: mumumu -->
<appendix xml:id="ldap.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.constants;
Expand Down Expand Up @@ -226,7 +226,10 @@
</term>
<listitem>
<simpara>
デバッグトレース用のビットレベルを指定します。
デバッグトレース用のビットレベルを指定します。トレースは
<literal>stderr</literal> に書き込まれます。レベルは OpenLDAP の
<filename>ldap_log.h</filename> ヘッダで定義されています。
PHP は、これらを定数として公開していません。
</simpara>
</listitem>
</varlistentry>
Expand Down Expand Up @@ -438,9 +441,8 @@
(<type>int</type>)
</term>
<listitem>
<simpara>
SSL 認証モード - 認証不要 (Oracle LDAPのみ)
</simpara>
<simpara>SSL 認証モード - 認証不要 (Oracle LDAPのみ)</simpara>
<warning><simpara>PHP 8.5.0 以降、非推奨です。</simpara></warning>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.gslc-ssl-oneway-auth">
Expand All @@ -449,9 +451,8 @@
(<type>int</type>)
</term>
<listitem>
<simpara>
SSL 認証モード - サーバー認証のみ必須 (Oracle LDAPのみ)
</simpara>
<simpara>SSL 認証モード - サーバー認証のみ必須 (Oracle LDAPのみ)</simpara>
<warning><simpara>PHP 8.5.0 以降、非推奨です。</simpara></warning>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.gslc-ssl-twoway-auth">
Expand All @@ -460,9 +461,8 @@
(<type>int</type>)
</term>
<listitem>
<simpara>
SSL 認証モード - サーバー認証とクライアント認証が両方必須 (Oracle LDAPのみ)
</simpara>
<simpara>SSL 認証モード - サーバー認証とクライアント認証が両方必須 (Oracle LDAPのみ)</simpara>
<warning><simpara>PHP 8.5.0 以降、非推奨です。</simpara></warning>
</listitem>
</varlistentry>

Expand Down
14 changes: 11 additions & 3 deletions reference/ldap/functions/ldap-bind.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 5bc68add3da3cd18c40f851e944b15095d3a26aa Maintainer: hirokawa Status: ready -->
<!-- EN-Revision: 87d63aa1a3fc86d64dc994332042fdd2c13bf3d8 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: takagi -->
<refentry xml:id="function.ldap-bind" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand All @@ -16,9 +16,17 @@
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>dn</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><modifier role="attribute">#[\SensitiveParameter]</modifier><type class="union"><type>string</type><type>null</type></type><parameter>password</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
<simpara>
指定した RDN およびパスワードを用いて LDAP ディレクトリにバインドします。
</para>
</simpara>
<note>
<simpara>
<function>ldap_connect</function> は接続パラメータを初期化するだけで、
LDAP サーバーへの実際のネットワーク接続は、この関数が確立します。
<constant>LDAP_OPT_PROTOCOL_VERSION</constant> や TLS 関連のオプションなど、
接続に影響するオプションは、この関数をコールする前に設定しなければなりません。
</simpara>
</note>
</refsect1>

<refsect1 role="parameters">
Expand Down
27 changes: 25 additions & 2 deletions reference/ldap/functions/ldap-connect-wallet.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: ce98b568f85353c4bf263133f09c4db9294833f9 Maintainer: mumumu Status: ready -->
<!-- EN-Revision: 8dc5bef8981ffd33c8c51f7f33414fcf5c03767a Maintainer: mumumu Status: ready -->
<refentry xml:id="function.ldap-connect-wallet" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>ldap_connect_wallet</refname>
Expand All @@ -12,7 +12,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier role="attribute">#[\Deprecated]</modifier>
<modifier role="attribute">#[\Deprecated(since: "8.5", message: "as it is broken since PHP 8.0")]</modifier>
<type class="union"><type>LDAP\Connection</type><type>false</type></type><methodname>ldap_connect_wallet</methodname>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>uri</parameter><initializer>&null;</initializer></methodparam>
<methodparam><type>string</type><parameter>wallet</parameter></methodparam>
Expand Down Expand Up @@ -74,6 +74,29 @@
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.5.0</entry>
<entry>
この関数は非推奨になりました。PHP 8.5.0 以降、
Oracle LDAP (Oracle Instant Client) のサポートは非推奨です。
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand Down
31 changes: 26 additions & 5 deletions reference/ldap/functions/ldap-connect.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: ca23605a1c0e46b9ec85975c6387528c32a7087f Maintainer: hirokawa Status: ready -->
<!-- EN-Revision: c048a5adc2726c0e5b68c5d7d8751e9854b6f637 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: takagi,mumumu -->
<refentry xml:id="function.ldap-connect" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand All @@ -24,16 +24,28 @@
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>host</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>389</initializer></methodparam>
</methodsynopsis>
<para>
<simpara>
<classname>LDAP\Connection</classname>
クラスのインスタンスを作成し、指定した
<parameter>uri</parameter>
が妥当であるかどうかを調べます。
</para>
</simpara>
<note>
<simpara>
この関数は、ネットワーク接続を確立<emphasis>しません</emphasis>。
URI の構文を検証し、接続パラメータを初期化するだけです。
実際の TCP 接続は、<function>ldap_bind</function>
をコールしたときに確立されます。
</simpara>
</note>
<note>
<simpara>
注意: この関数は、接続を確立するわけでは <emphasis>ありません</emphasis>。
指定したパラメータが妥当であり、必要に応じて接続をオープンできるかどうかを調べるだけです。
<constant>LDAP_OPT_PROTOCOL_VERSION</constant> や TLS 関連のオプション
(<literal>LDAP_OPT_X_TLS_*</literal>) など、接続の確立に影響するオプションは、
この関数をコールした後、<function>ldap_bind</function> をコールする前に、
<function>ldap_set_option</function> で設定しなければなりません。
TLS 関連のオプションは、<function>ldap_set_option</function>
の最初の引数に &null; を渡して、グローバルに設定しなければなりません。
</simpara>
</note>
</refsect1>
Expand Down Expand Up @@ -110,6 +122,15 @@
</row>
</thead>
<tbody>
<row>
<entry>8.5.0</entry>
<entry>
Oracle wallet 用の引数を渡して <function>ldap_connect</function>
をコールすることは非推奨です。
PHP 8.5.0 以降、Oracle LDAP (Oracle Instant Client)
のサポートは非推奨です。
</entry>
</row>
<row>
<entry>8.4.0</entry>
<entry>
Expand Down
4 changes: 3 additions & 1 deletion reference/ldap/functions/ldap-get-option.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 5b3a84935252a553528cb81b3dacb88647b57c7b Maintainer: hirokawa Status: ready -->
<!-- EN-Revision: c048a5adc2726c0e5b68c5d7d8751e9854b6f637 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: takagi,mumumu -->
<refentry xml:id="function.ldap-get-option" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -258,6 +258,8 @@
<entry>8.5.0</entry>
<entry>
<parameter>ldap</parameter> は、nullable になりました。
無効な <parameter>option</parameter> を渡すと、
<exceptionname>ValueError</exceptionname> がスローされるようになりました。
</entry>
</row>
&ldap.changelog.ldap-object;
Expand Down
40 changes: 37 additions & 3 deletions reference/ldap/functions/ldap-set-option.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 5b3a84935252a553528cb81b3dacb88647b57c7b Maintainer: hirokawa Status: ready -->
<!-- EN-Revision: 9ade3ccfc8f1fa82f116a2b2c1e5e3f516fb11e7 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: takagi,mumumu -->
<refentry xml:id="function.ldap-set-option" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand All @@ -16,9 +16,18 @@
<methodparam><type>int</type><parameter>option</parameter></methodparam>
<methodparam><type class="union"><type>array</type><type>string</type><type>int</type><type>bool</type></type><parameter>value</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
指定したオプションの値を <parameter>value</parameter> に設定します。
</para>
</simpara>
<note>
<simpara>
TLS 関連のオプション (<literal>LDAP_OPT_X_TLS_*</literal>) は、
<parameter>ldap</parameter> に &null; を渡してグローバルに設定しなければなりません。
TLS コンテキストは、接続ごとの設定より前に初期化されるからです。
また、これらのオプションは <function>ldap_bind</function>
をコールする前に設定しなければなりません。
</simpara>
</note>
</refsect1>

<refsect1 role="parameters">
Expand Down Expand Up @@ -261,6 +270,13 @@
</row>
</thead>
<tbody>
<row>
<entry>8.5.0</entry>
<entry>
無効な <parameter>option</parameter> を渡すと、
<exceptionname>ValueError</exceptionname> がスローされるようになりました。
</entry>
</row>
&ldap.changelog.ldap-object;
</tbody>
</tgroup>
Expand Down Expand Up @@ -299,6 +315,24 @@ if (!ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array($ctrl1, $ctrl2))) {
echo "サーバーコントロールの設定に失敗しました。";
}
?>
]]>
</programlisting>
</example>
<example>
<title>接続の問題のデバッグ</title>
<programlisting role="php">
<![CDATA[
<?php
// 接続に NULL を指定すると、プロセス全体に対してオプションを設定します (OpenLDAP のみ)。
// ldap_connect() の前に設定すると、初期化処理もトレースされます。後から設定すると、
// それ以降の操作だけがトレースされます。
// 7 は、OpenLDAP のレベル 1 (トレース)、2 (パケット)、4 (引数) を組み合わせたものです。
// トレースはスクリプトの出力ではなく、stderr に書き込まれます。
ldap_set_option(null, LDAP_OPT_DEBUG_LEVEL, 7);

$ds = ldap_connect("ldaps://ldap.example.com:636");
ldap_bind($ds);
?>
]]>
</programlisting>
</example>
Expand Down
Loading