Re: [PHP] ldap_connect(URI)?

2001-12-04 Thread Stig Venaas

Hi again Susanne, I'm on this list too...

On Tue, Dec 04, 2001 at 11:13:51AM +0100, Susanne Benkert wrote:
 The LDAP server is already recompiled and running with ssl/tsl-support.
 PHP-4.0.6. is compiled with-openssl. But when I try to use
 ldap_connect('ldaps://hostname/') like suggested in the manual, the
 script can't connect the server. Also 'ldap://...' or 'http://..' don't
 work, so it seems, that PHP doesn't support URIs in this position, but
 according to the manual it should do.
 
 What's wrong with my script or my installation?
 Thank you for your support.

This works for me. For ldap_connect(ldap://hostname;) to work, you need
OpenLDAP 2.x libs but that's all. Are you sure PHP is using that library?
If you use for instance Linux, you could try to check with ldd binary.
Also when you configure PHP, you can try --with-ldap=ldapinstalldirectory
and not just --with-ldap. When this is working, you can start thinking of
ldaps.

For ldap_connect(ldaps://hostname) to work, you need to compile the
OpenLDAP 2.x libs with SSL/TLS, and also configure PHP with --with-openssl.

Stig

-- 
PHP General 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]




Re: [PHP] ldap_connect(URI)?

2001-12-04 Thread Susanne Benkert

Hi Stig,

Unknown Sender wrote:
 
 
 This works for me. For ldap_connect(ldap://hostname;) to work, you need
 OpenLDAP 2.x libs but that's all. Are you sure PHP is using that library?

I'm quite sure, because other ldap functions work properly such as
ldap_connect(hostname); or ldapsearch()...
I already have a few PHP websites which are using these functions
without problems. Only the newer ones like ldap_set_option() or
ldap_start_tls() or (as mentioned) ldap_connect() with an URI don't
work, although I use a PHP version that should support these things.

Are there any additional libs for that?


Bye,
Susanne

-- 
PHP General 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]




Re: [PHP] ldap_connect(URI)?

2001-12-04 Thread Stig Venaas

On Tue, Dec 04, 2001 at 12:19:24PM +0100, Susanne Benkert wrote:
  This works for me. For ldap_connect(ldap://hostname;) to work, you need
  OpenLDAP 2.x libs but that's all. Are you sure PHP is using that library?
 
 I'm quite sure, because other ldap functions work properly such as
 ldap_connect(hostname); or ldapsearch()...
 I already have a few PHP websites which are using these functions
 without problems. Only the newer ones like ldap_set_option() or
 ldap_start_tls() or (as mentioned) ldap_connect() with an URI don't
 work, although I use a PHP version that should support these things.
 
 Are there any additional libs for that?

It really sounds like you are using PHP with another LDAP library than
OpenLDAP 2.x or Netscape. If you could recompile PHP, could you try to
see what LDAP library is used in the compilation? Maybe you can see it
by grepping for ldap in config.log. Could you check if you have the
file ldap.h in several locations. Has all the ldap.h you find got
something like this inside them:
#define LDAP_API_VERSION   2004

PHP checks for this to determine if ldap_set_option() etc. should be
included.

If the ldap.h comes from OpenLDAP 2.x, LDAP_API_VERSION should be
defined.

Stig


-- 
PHP General 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]