Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19932 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20364 invoked by uid 1010); 9 Nov 2005 08:04:00 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 20347 invoked from network); 9 Nov 2005 08:04:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Nov 2005 08:04:00 -0000 X-Host-Fingerprint: 195.197.172.116 gw02.mail.saunalahti.fi Linux 2.4/2.6 Received: from ([195.197.172.116:48341] helo=gw02.mail.saunalahti.fi) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id DA/10-05064-F6DA1734 for ; Wed, 09 Nov 2005 03:04:00 -0500 Received: from nest.netphobia.fi (YZDCXXXI.dsl.saunalahti.fi [85.76.35.232]) by gw02.mail.saunalahti.fi (Postfix) with ESMTP id 4AF98D68C8; Wed, 9 Nov 2005 10:03:54 +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 jA983sdo023797; Wed, 9 Nov 2005 10:03:54 +0200 Received: from localhost (jani@localhost) by nest.netphobia.fi (8.13.1/8.13.1/Submit) with ESMTP id jA983sWg023794; Wed, 9 Nov 2005 10:03:54 +0200 X-Authentication-Warning: nest.netphobia.fi: jani owned process doing -bs Date: Wed, 9 Nov 2005 10:03:54 +0200 (EET) Reply-To: Jani Taskinen To: Pierangelo Masarati cc: venaas@php.net, internals@lists.php.net In-Reply-To: <1131521067.20182.2.camel@ando> Message-ID: References: <1131485315.3327.15.camel@ando> <1131492177.3327.25.camel@ando> <1131521067.20182.2.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) On Wed, 9 Nov 2005, Pierangelo Masarati wrote: > > On Wed, 2005-11-09 at 07:05 +0200, Jani Taskinen wrote: >> The "control-patch" looks okay. But the "warning-fix-patch" really doesn't. >> You're actually changing some functions behaviour with some of those >> changes. Maybe you didn't notice but there's ldap_get_values() and >> ldap_get_values_len() separately. And there's ldap_bind() and ldap_sasl_bind(), > > What I'm doing is driven by the fact that the ldap_*value*() family, and > the ldap_bind*() are being deprecated (that is: they're in the library, > but they're not declared in ldap.h any more, and they are implemented as > wrappers to the replacements I'm using, at the cost of extra execution > time and resources, plus decent compiler warnings). Perhaps with OpenLDAP, but what about the other implementations with which this extension works just fine? You didn't wrap all those changes inside the #ifdef's. > ldap_*value*_len() is the safe implementation of ldap_*value*(), because > it can also handle non-null terminated values; this doesn't inhibit the > handling null-terminated ones. Moreover, PHP needs the length of the > string anyway, so... Note that this would allow PHP to use only > ldap_get_values() for both, making the API more simple and robust (I > vaguely recall the issue that brought to implementing > ldap_get_values_len() in PHP, I think it was somewhere in PHP 3 and the > patch took a while to get there). I agree it's better this way, but (even as unlikely it is) changing this MIGHT break someone's script. Anyway, it might be the time to cleanup the API of this extension and make it simpler. It's pretty confusing as it is. The returned arrays are also weird with their "count" fields and such. > Anyway, none of these is an issue to me, so I'm fine with the controls > patch. A final comment: apart from some fuzziness complaints, both > patches apply also to PHP 4 without changes. This means we can get into > production immediately (well, after some testing... :) This is a new feature and new features are no longer added in PHP 4. We only add new stuff in PHP >= 5.1. --Jani