Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19928 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45999 invoked by uid 1010); 8 Nov 2005 22:37:44 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 45983 invoked from network); 8 Nov 2005 22:37:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Nov 2005 22:37:44 -0000 X-Host-Fingerprint: 195.197.172.115 gw01.mail.saunalahti.fi Linux 2.4/2.6 Received: from ([195.197.172.115:45613] helo=gw01.mail.saunalahti.fi) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 59/93-09491-8B821734 for ; Tue, 08 Nov 2005 17:37:44 -0500 Received: from nest.netphobia.fi (YZDCXXXI.dsl.saunalahti.fi [85.76.35.232]) by gw01.mail.saunalahti.fi (Postfix) with ESMTP id 1508CFE01E; Wed, 9 Nov 2005 00:37:37 +0200 (EET) Received: from nest.netphobia.fi (nest.netphobia.fi [127.0.0.1]) by nest.netphobia.fi (8.13.1/8.13.1) with ESMTP id jA8Mbe06017874; Wed, 9 Nov 2005 00:37:40 +0200 Received: from localhost (jani@localhost) by nest.netphobia.fi (8.13.1/8.13.1/Submit) with ESMTP id jA8Mbev3017871; Wed, 9 Nov 2005 00:37:40 +0200 X-Authentication-Warning: nest.netphobia.fi: jani owned process doing -bs Date: Wed, 9 Nov 2005 00:37:40 +0200 (EET) Reply-To: Jani Taskinen To: Pierangelo Masarati cc: venaas@php.net, internals@lists.php.net In-Reply-To: <1131485315.3327.15.camel@ando> Message-ID: References: <1131485315.3327.15.camel@ando> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: [PHP-DEV] LDAP controls in response From: sniper@iki.fi (Jani Taskinen) I quickly glanced through your patch and if you don't mind, can you please separate the warning-fixes and functionality patch? (one patch for fixes, one for adding new stuff :) It's a bit too much to try and see what was added and what is supposed to silence some warning. --Jani On Tue, 8 Nov 2005, Pierangelo Masarati wrote: > Stig, > > I need to use LDAP controls in PHP, including control response from > server to client, so I patched the 5.0.5/HEAD code to add an extra arg > to ldap_parse_result() and ldap_parse_reference(). I'd need this patch > in production at some point, that's why it would be great to see it > merged into the mainstream; however, I'm little familiar with the > internals of PHP, so please excuse me if I missed anything in coding and > in the submission procedure. > > The very same patch applies to HEAD and to 5.0.5. If you don't mind, > I'm posting it to you right now, pending further work. It also includes > some extra work I did to eliminate some warnings from OpenLDAP 2.3, but > it works fine with 2.2 as well. All changes specific to OpenLDAP are > protected behind the LDAP_API_FEATURE_X_OPENLDAP macro. Unfortunately I > have no chances to check it with other APIs right now. I'm also > including a trivial script I tested with ./sapi/cli/php against the > server resulting from test003 of OpenLDAP 2.3; to reproduce, just > > cd openldap/tests/ > ../run -k test003 > cd php > ../sapi/cli/php pagedResults.php > > If the code looks fine, I plan to document the new API, which is > completely backwards compatible, and add some facilities to > encode/decode the control values; hopefully, I won't have to get to > writing a complete wrapper around liblber! > > My idea is to provide dumb helpers that encode well-known controls > through a trivial API; e.g., for pagedResults: > > ldap_control_paged_results($handler, $size, $iscritical[, $cookie]) > ldap_control_paged_results_resp($result, &$cookie[, &$iscritical[, & > $estimate]]) > > for passwdPolicy: > > ldap_control_passwd_policy($handler[, $iscritical]) > ldap_control_passwd_policy_resp($result, &$warning, &$error) > > Please let me know if you need me to do anything else. > > Sincerely, p. > >