#18659 [Com]: can not bind a ldap server via function ldap_bind()
| From: | mose at ns dot cune dot edu | Date: | Sun, 08 Sep 2002 22:28:02 +0000 |
| Subject: | #18659 [Com]: can not bind a ldap server via function ldap_bind() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-18695@lists.php.net to get a copy of this message | ||
ID: 18659
Comment by: mose@ns.cune.edu
Reported By: lesson@263.net
Status: Bogus
Bug Type: LDAP related
Operating System: Red had 7.2
PHP Version: 4.2.2
New Comment:
Bzzzzzt. Bogus, my foot. Thanks for playing, but it is a bug, not a
support question. I see that this bug was reported in July, and it
still is not fixed. Here I thought it wasn't fixed because no one
reported it. Take a look at bug #19281 and get a move on. Chop, chop.
Previous Comments:
------------------------------------------------------------------------
[2002-09-05 20:04:13] davidkoopman@yahoo.com
I am trying to fix my 4.2.2 version of PHP so it will work with
openldap-2.1.4. The ldap_bind function will not work out of the box.
ldap.c needs to be modified to work with version 3.
When I try to bind, I get:
ldap_bind(): Unable to bind to server
When running slapd in debug mode, here is output from it:
do_bind: version=2 dn="cn=Manager,dc=example,dc=com" method=128
send_ldap_result: conn=0 op=0 p=2
send_ldap_response: msgid=1 tag=97 err=2
ber_flush: 52 bytes to sd 12
0000: 30 32 02 01 01 61 2d 0a 01 02 04 00 04 26 72 65
02...a-......&re
0010: 71 75 65 73 74 65 64 20 70 72 6f 74 6f 63 6f 6c quested
protocol
0020: 20 76 65 72 73 69 6f 6e 20 6e 6f 74 20 61 6c 6c version
not all
0030: 6f 77 65 64 owed
ldap_write: want=52, written=52
0000: 30 32 02 01 01 61 2d 0a 01 02 04 00 04 26 72 65
02...a-......&re
0010: 71 75 65 73 74 65 64 20 70 72 6f 74 6f 63 6f 6c quested
protocol
0020: 20 76 65 72 73 69 6f 6e 20 6e 6f 74 20 61 6c 6c version
not all
0030: 6f 77 65 64 owed
NOTICE the "version not allowed" comments coming from slapd.
------------------------------------------------------------------------
[2002-07-31 04:24:41] hholzgra@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2002-07-31 03:26:44] lesson@263.net
I have got a problem when bind to a ldap server
software:
apache_1.3.26
php-4.2.2
openldap-2.1.3
mysql-3.23.51
install:
[mysql]
./configure --prefix=/usr/local/mysql
make
make install
[openldap]
env CPPFLAGS=-I/usr/local/BerkeleyDB.4.0/include
LDFLAGS=-L/usr/local/BerkeleyDB.4.0/lib ./configure
make
make install
[php]
cd ../apache_1.3.26
./configure
cd ../php-4.2.2
./configure --with-mysql --with-ldap
--with-apache=../apache_1.3.26
make
make install
[apache] ./configure --prefix=/usr/local/apache
--activate-module=src/modules/php4/libphp4.a
make
make install
No errors report while install.
here is my test program
<?php
echo "<h3>LDAP query test</h3>";
echo "Connecting ...";
$ds=ldap_connect("localhost");
echo "connect result is ".$ds."<p>";
if ($ds) {
echo "Binding ...";
$r=ldap_bind_s($ds); // this is an "anonymous" bind, typically
// read-only access
echo "Bind result is ".$r."<p>";
?>
and I got a error message below:
Warning: LDAP: Unable to bind to server: Protocol error in
/home/httpd/html/test.php
any idea?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18659&edit=1