ID:               29587
 Comment by:       deon at wurley dot net
 Reported By:      DavidSmith at byu dot net
 Status:           No Feedback
 Bug Type:         LDAP related
 Operating System: Fedora Core 1
 PHP Version:      4.3.8
 New Comment:

I'm seeing this problem in Fedora Core 3 - which is using php 4.3.10.

Withouth having to create my own php - any tips on how this can be
resolved?

Is there a fix in the code available?


Previous Comments:
------------------------------------------------------------------------

[2005-02-11 01:00:29] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2005-02-03 04:51:34] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



------------------------------------------------------------------------

[2004-10-01 15:26:50] DavidSmith at byu dot net

ldap.conf has nothing to do with this bug. I am performing an
ldap_read() and explicitly specificying my own search base (the empty
string, ""). In this case, PHP and the LDAP libraries should not be
reading the "base" directive in ldap.conf.

Despite this glaringly obvious fact, I tried removing the "base"
directive from ldap.conf to see if that fixed it. It had no effect on
the bug. So I tried changing the "base" directive from
dc=example,dc=com to the correct one, dc=phpldapadmin,dc=com, but PHP
still searches with base dc=example,dc=com (yes I restarted my web
server and LDAP server). So then I tried creating ~apache/.ldaprc and
setting the base to dc=phpldapadmin,dc=com there. Still no effect on
the bug.

This is a bug. No matter what setting I have for my base in ldap.conf,
PHP should is NOT using the base I specify in my call to ldap_read().

Perhaps PHP is interpreting a base of "" to mean "the default base DN
specified somewhere else". This is NOT the desired behavior. The RFCs
state that when searching with a base DN set to the empty string and a
scope of "base", that the RootDSE entry should be returned. Note also
that other versions of PHP work just fine with no changes to the LDAP
libraries. See comments from other users as well.

Also note that ldapsearch works just fine, so it's obviously not the
LDAP client libraries. This is a PHP bug.

--Dave

------------------------------------------------------------------------

[2004-10-01 10:08:37] [EMAIL PROTECTED]

Search for ldap.conf (your filesystem and google)..
That's where the example.com comes from. 


------------------------------------------------------------------------

[2004-09-28 00:17:08] DavidSmith at byu dot net

In response to you inquiry, a peer of mine reports the following:

> I have just tested the same code on Mandrake 10, php 4.3.7, and it
works
> fine.
> 
> The system that I was having the problem on is RHEL3, php 4.3.4.   I
will
> do a little recompiled of PHP
> and see how it goes.
> 
> It appears that, on the system with the problem.  when  this bit of
code
> runs
> 
> // Fetch basic RootDSE attributes using the + and *.
> $r = @ldap_read( $ds, '', 'objectClass=*', array( '+', '*' ) );
> 
> 
> The ldap server receives a search, with base "dc=example,dc=com",
which is
> a little strange,
> as I can't find the string "dc=example" anywhere in the php or ldap
server
> source. Guess it must be comming from somwhere however.
> 
> I would be happy fix the problem, except it appears to be nothing to
do
> with the PHP code, but rather PHP, or the openldap libraries it's
compiled
> against. Do you know about the Monitor back end for openldap?  I
found
> that
> when I was looking around at this problem, and that backend appears
to
> provide some usful information also.
> 
> It may not be very ustul, but here is a list of the system libaries
> versions that does not work.
> 
> [EMAIL PROTECTED] nelg]$ rpm -qi openldap
> Name        : openldap                     Relocations: (not
relocatable)
> Version     : 2.0.27                            Vendor: Red Hat,
Inc.
> Release     : 11                            Build Date: Sat 20 Sep
2003
> 09:23:05 NZST
> Install Date: Fri 29 Aug 2003 00:37:34 NZST      Build Host:
> bugs.devel.redhat.com
> Group       : System Environment/Daemons    Source RPM:
> openldap-2.0.27-11.src.rpm
> Size        : 1153098                          License: OpenLDAP
> Signature   : DSA/SHA1, Thu 25 Sep 2003 05:41:52 NZST, Key ID
> 219180cddb42a60e
> Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
> URL         : http://www.openldap.org/
> Summary     : The configuration files, libraries, and documentation
for
> OpenLDAP.
> 
> [EMAIL PROTECTED] nelg]$ rpm -qi php-ldap
> Name        : php-ldap                     Relocations: (not
relocatable)
> Version     : 4.3.4                             Vendor: (none)
> Release     : 1mdk                          Build Date: Mon 17 May
2004
> 08:44:12 NZST
> Install Date: Mon 17 May 2004 08:44:35 NZST      Build Host:
> 10-1-3-251.tcs.ac.nz
> Group       : Development/Languages         Source RPM:
> php-ldap-4.3.4-1mdk.src.rpm
> Size        : 70198                            License: PHP License
> Signature   : (none)
> URL         : http://www.php.net
> Summary     : A module for PHP applications that use LDAP.
>

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/29587

-- 
Edit this bug report at http://bugs.php.net/?id=29587&edit=1

Reply via email to