Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100046 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24253 invoked from network); 26 Jul 2017 12:55:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jul 2017 12:55:39 -0000 Authentication-Results: pb1.pair.com header.from=come@opensides.be; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=come@opensides.be; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain opensides.be designates 195.154.20.141 as permitted sender) X-PHP-List-Original-Sender: come@opensides.be X-Host-Fingerprint: 195.154.20.141 smtp.opensides.be Received: from [195.154.20.141] ([195.154.20.141:43541] helo=smtp.opensides.be) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/76-49004-94198795 for ; Wed, 26 Jul 2017 08:55:38 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp.opensides.be (Postfix) with ESMTP id 260811C05FE; Wed, 26 Jul 2017 14:55:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at opensides.be Received: from smtp.opensides.be ([127.0.0.1]) by localhost (smtp.opensides.be [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 9LJzkTGIxb9S; Wed, 26 Jul 2017 14:55:34 +0200 (CEST) Received: from mcmic-probook.localnet (63.120.199.77.rev.sfr.net [77.199.120.63]) by smtp.opensides.be (Postfix) with ESMTPSA id 32E541C05B9; Wed, 26 Jul 2017 14:55:34 +0200 (CEST) To: internals@lists.php.net Date: Wed, 26 Jul 2017 14:55:25 +0200 Message-ID: <2177132.cc4GXqHK7k@mcmic-probook> Organization: OpenSides User-Agent: KMail/5.2.3 (Linux/4.9.0-3-amd64; KDE/5.28.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Subject: LDAP controls support API From: come@opensides.be (=?ISO-8859-1?Q?C=F4me?= Chilliet) Hello, I=E2=80=99m looking into adding control support to all ldap operations in p= hp-ldap. You can see a WIP PR here: https://github.com/php/php-src/pull/2640 Next step is to add control support for ldap_modify, ldap_add, ldap_search,= =E2=80=A6 The historic patch for this added functions like ldap_modify_ext, ldap_add_= ext=E2=80=A6 for this which I would like to avoid. So this means I cannot change the return type, only add parameters. One solution is to change: bool ldap_modify ( resource $link_identifier , string $dn , array $entry ) Into: bool ldap_modify ( resource $link_identifier , string $dn , array $entry, a= rray $servercontrols, array $clientcontrols, array &$resultcontrols ) The problem is that it still does not give access to the result object and = thus to errmsg and referrals which can be obtained with ldap_parse_result. So I was thinking maybe: bool ldap_modify ( resource $link_identifier , string $dn , array $entry, a= rray $servercontrols, array $clientcontrols, [resource &$resultobject]) =2D> if the last parameter is omitted, it works as before, if it is given, = then the user will have to call ldap_parse_result on it to get the informat= ion it wants. What do you think of this solution ? I don=E2=80=99t see any other giving access to all available information wi= thout BC. This will have to be changed for almost all ldap_* operations. Even ldap_bi= nd can return controls in the result. C=C3=B4me