From d30ad0a65f8489769552faed188873f90c27a6ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E7=94=B0=20=E6=86=B2=E5=A4=AA=E9=83=8E?= Date: Sun, 11 Oct 2026 13:39:24 +0900 Subject: [PATCH] =?UTF-8?q?ldap=20=E3=82=92=E5=8E=9F=E6=96=87=E3=81=AE?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E3=81=AB=E8=BF=BD=E5=BE=93=20(6=E3=83=95?= =?UTF-8?q?=E3=82=A1=E3=82=A4=E3=83=AB)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/ldap/constants.xml | 22 +++++----- reference/ldap/functions/ldap-bind.xml | 14 +++++-- .../ldap/functions/ldap-connect-wallet.xml | 27 ++++++++++++- reference/ldap/functions/ldap-connect.xml | 31 +++++++++++--- reference/ldap/functions/ldap-get-option.xml | 4 +- reference/ldap/functions/ldap-set-option.xml | 40 +++++++++++++++++-- 6 files changed, 113 insertions(+), 25 deletions(-) diff --git a/reference/ldap/constants.xml b/reference/ldap/constants.xml index 842a0c8139..a743438edc 100644 --- a/reference/ldap/constants.xml +++ b/reference/ldap/constants.xml @@ -1,6 +1,6 @@ - + &reftitle.constants; @@ -226,7 +226,10 @@ - デバッグトレース用のビットレベルを指定します。 + デバッグトレース用のビットレベルを指定します。トレースは + stderr に書き込まれます。レベルは OpenLDAP の + ldap_log.h ヘッダで定義されています。 + PHP は、これらを定数として公開していません。 @@ -438,9 +441,8 @@ (int) - - SSL 認証モード - 認証不要 (Oracle LDAPのみ) - + SSL 認証モード - 認証不要 (Oracle LDAPのみ) + PHP 8.5.0 以降、非推奨です。 @@ -449,9 +451,8 @@ (int) - - SSL 認証モード - サーバー認証のみ必須 (Oracle LDAPのみ) - + SSL 認証モード - サーバー認証のみ必須 (Oracle LDAPのみ) + PHP 8.5.0 以降、非推奨です。 @@ -460,9 +461,8 @@ (int) - - SSL 認証モード - サーバー認証とクライアント認証が両方必須 (Oracle LDAPのみ) - + SSL 認証モード - サーバー認証とクライアント認証が両方必須 (Oracle LDAPのみ) + PHP 8.5.0 以降、非推奨です。 diff --git a/reference/ldap/functions/ldap-bind.xml b/reference/ldap/functions/ldap-bind.xml index 673c765980..5fc84027be 100644 --- a/reference/ldap/functions/ldap-bind.xml +++ b/reference/ldap/functions/ldap-bind.xml @@ -1,6 +1,6 @@ - + @@ -16,9 +16,17 @@ stringnulldn&null; #[\SensitiveParameter]stringnullpassword&null; - + 指定した RDN およびパスワードを用いて LDAP ディレクトリにバインドします。 - + + + + ldap_connect は接続パラメータを初期化するだけで、 + LDAP サーバーへの実際のネットワーク接続は、この関数が確立します。 + LDAP_OPT_PROTOCOL_VERSION や TLS 関連のオプションなど、 + 接続に影響するオプションは、この関数をコールする前に設定しなければなりません。 + + diff --git a/reference/ldap/functions/ldap-connect-wallet.xml b/reference/ldap/functions/ldap-connect-wallet.xml index 5549bbd068..16ab23005d 100644 --- a/reference/ldap/functions/ldap-connect-wallet.xml +++ b/reference/ldap/functions/ldap-connect-wallet.xml @@ -1,6 +1,6 @@ - + ldap_connect_wallet @@ -12,7 +12,7 @@ &reftitle.description; - #[\Deprecated] + #[\Deprecated(since: "8.5", message: "as it is broken since PHP 8.0")] LDAP\Connectionfalseldap_connect_wallet stringnulluri&null; stringwallet @@ -74,6 +74,29 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.5.0 + + この関数は非推奨になりました。PHP 8.5.0 以降、 + Oracle LDAP (Oracle Instant Client) のサポートは非推奨です。 + + + + + + + &reftitle.seealso; diff --git a/reference/ldap/functions/ldap-connect.xml b/reference/ldap/functions/ldap-connect.xml index 81c6e62b12..fc9b722dc0 100644 --- a/reference/ldap/functions/ldap-connect.xml +++ b/reference/ldap/functions/ldap-connect.xml @@ -1,6 +1,6 @@ - + @@ -24,16 +24,28 @@ stringnullhost&null; intport389 - + LDAP\Connection クラスのインスタンスを作成し、指定した uri が妥当であるかどうかを調べます。 - + + + + この関数は、ネットワーク接続を確立しません。 + URI の構文を検証し、接続パラメータを初期化するだけです。 + 実際の TCP 接続は、ldap_bind + をコールしたときに確立されます。 + + - 注意: この関数は、接続を確立するわけでは ありません。 - 指定したパラメータが妥当であり、必要に応じて接続をオープンできるかどうかを調べるだけです。 + LDAP_OPT_PROTOCOL_VERSION や TLS 関連のオプション + (LDAP_OPT_X_TLS_*) など、接続の確立に影響するオプションは、 + この関数をコールした後、ldap_bind をコールする前に、 + ldap_set_option で設定しなければなりません。 + TLS 関連のオプションは、ldap_set_option + の最初の引数に &null; を渡して、グローバルに設定しなければなりません。 @@ -110,6 +122,15 @@ + + 8.5.0 + + Oracle wallet 用の引数を渡して ldap_connect + をコールすることは非推奨です。 + PHP 8.5.0 以降、Oracle LDAP (Oracle Instant Client) + のサポートは非推奨です。 + + 8.4.0 diff --git a/reference/ldap/functions/ldap-get-option.xml b/reference/ldap/functions/ldap-get-option.xml index c3fa8cb7d8..fd7144d9dd 100644 --- a/reference/ldap/functions/ldap-get-option.xml +++ b/reference/ldap/functions/ldap-get-option.xml @@ -1,6 +1,6 @@ - + @@ -258,6 +258,8 @@ 8.5.0 ldap は、nullable になりました。 + 無効な option を渡すと、 + ValueError がスローされるようになりました。 &ldap.changelog.ldap-object; diff --git a/reference/ldap/functions/ldap-set-option.xml b/reference/ldap/functions/ldap-set-option.xml index 2217053800..30785384cc 100644 --- a/reference/ldap/functions/ldap-set-option.xml +++ b/reference/ldap/functions/ldap-set-option.xml @@ -1,6 +1,6 @@ - + @@ -16,9 +16,18 @@ intoption arraystringintboolvalue - + 指定したオプションの値を value に設定します。 - + + + + TLS 関連のオプション (LDAP_OPT_X_TLS_*) は、 + ldap に &null; を渡してグローバルに設定しなければなりません。 + TLS コンテキストは、接続ごとの設定より前に初期化されるからです。 + また、これらのオプションは ldap_bind + をコールする前に設定しなければなりません。 + + @@ -261,6 +270,13 @@ + + 8.5.0 + + 無効な option を渡すと、 + ValueError がスローされるようになりました。 + + &ldap.changelog.ldap-object; @@ -299,6 +315,24 @@ if (!ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array($ctrl1, $ctrl2))) { echo "サーバーコントロールの設定に失敗しました。"; } ?> +]]> + + + + 接続の問題のデバッグ + + ]]>