ID: 14355
Updated by: venaas
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: LDAP related
Operating System: Solaris 2.6 (SPARC)
PHP Version: 4.0.6
New Comment:

I'm sorry, I don't have any solutions for you. I guess
no one else does either.

First of all, have you tried to supply an IP address, so that we can be sure it's not 
DNS related? Did you try to build with the Oracle 8i LDAP? You can do that with 
something like --with-ldap=/usr/local/oracle/product/8.1.6
It would be interesting to know whether the problem was
still there.

If you use OpenLDAP 2.x and very latest PHP snapshot, you
can get debugging output by doing
ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);
at the beginning of your script. Last parameter is a bit
mask. If you don't want to use latest PHP, the easiest is to add something like
int debug = 7;
ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, &debug);
inside PHP's ldap_connect(). You could also try to add some debugging code in the 
OpenLDAP library (or use gdb or something). I would then try to add a printf() to the
beginning of ldap_init() in libldap/open.c

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

[2001-12-10 01:17:38] [EMAIL PROTECTED]

tried it with php built into apache statically.  same 
problem..

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

[2001-12-06 01:19:33] [EMAIL PROTECTED]

I just watched the wire w/ tcpdump - there's no 
communication between the webserver and the LDAP server.

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

[2001-12-05 18:58:28] [EMAIL PROTECTED]

server config - Sun Ultra 2 (dual 300mhz IIs), 768MB RAM, 
Solaris 2.6 (SPARC), Apache 1.3.20, PHP 4.0.6 (and 4.0CVS-
12-0-4) configured as DSOs.

I'm trying to build PHP as an apache module w/ support for 
LDAP (for use w/ HORDE).  PHP builds fine, and apxs is able 
to make the .so file, but I regularly get "Unable to 
connect to LDAP server".  Apache doesn't segfault, and 
phpinfo() shows that LDAP support has been built in.  There 
is no mention of it in my php error log, nor my apache 
error log.

My build was fairly complex (including support Oracie 8i, 
which I disabled when I found the OpenLDAP / OCI8 / Solaris 
threads in the bugs database).  I've tried building against 
OpenLDAP 1.2.12, 1.2.13, 2.0.18 and the Oracle LDAP library 
that ships w/ 8.1.17 (when I added --with-oci8).  The most 
basic configuration line looks like:

env CC="gcc" \
CFLAGS="-I/usr/local/openldap/include" \
CPPFLAGS="-I/usr/local/openldap/include" \
CXXFLAGS="-I/usr/local/openldap/include" \
./configure --with-apxs=/usr/local/apache/bin/apxs \
--with-ldap=/usr/local/openldap

I make distclean between re-configure and re-builds.

I've tried gcc 2.95.2, 2.95.3, and the Sun Workshop (4.2) 
version cc.  I've had no problem with PHP+LDAP when built 
as the CGI.  The DSO has been very flakey.  I've not tried 
building PHP directly into Apache. If the DSO works, it 
works until the apache is restarted.  I've not kept track, 
but I'd say at least 75% of the time after apache is 
restarted (or stopped and started), LDAP doesn't work - and 
this behavior is consistant with the various LDAP libraries 
I've tried.

I wish I could provide more information - is there 
additional debugging I can turn on, or maybe add to the C 
code?

thanks much



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



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


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to