Okay, I'll try to help. On Wed, Jul 03, 2002 at 02:58:10PM -0400, Stewart Dean wrote: > PHP is a wonderful piece of work but not much use if I can't get it compiled. I > have posted this problem twice and gotten zip response. There's plenty of > documentation for implementation & programming *after* the installation, but > installation docs have gaping holes in them...to list just a very few basic > questions currently bedeviling me: > 1) What implementation(s) of LDAP are supported?
Anything that follows the API in RFC 1823 (including UMich LDAP, OpenLDAP 1.x and Oracle) and anything that follows the new api desribed in the IETF draft draft-ietf-ldapext-ldap-c-api-05.txt (including OpenLDAP 2.x and iPlanet with small mods) should work. Some implementations might not exactly follow these specs, if necessary we can do small modifications to support more libraries, but maybe not a completely different API. All LDAP APIs I know of are quite similar though. > 2) What functionality and access is engaged by setting the --with-ldap option in > PHP configure? Is there any builtin support as there is for MySQL? Is this ldap > support for use with client LDAP or server LDAP or some hardwired standard port > interface connection? Is the ldap needed as middleware API for PHP because it has > none of its own? LDAP is not built in, so you need to have an LDAP library and matching header files installed (it looks like you have this). If it is not in a standard place, you will have to do --with-ldap=DIR where DIR is the top dir that contains header and lib files. When you compile PHP with this you can access LDAP servers, PHP acts as a client. This is just like accessing say MySQL. The functionality you get is described in the LDAP section in the manual. You get the functions listed and that's it. > I'm baffled that an LDAP that responds properly to remote calls apparently can't > be used locally by PHP as evidenced by the compile failure. No, you can use PHP with LDAP on the same host just fine, the compile failure only shows that the library you use isn't fully supported at the moment, or there is something unusual with your set up, either something wrong, or something that PHP doesnt't cater for. > My original post and problem ======================================== > The failure is detailed below, but apparently the PHP compile is looking for a > symbolic that doesn't exist under IBM's LDAP implementation. Yes, seems so. > I can find next to nothing about the LDAP infrastructure that PHP is expecting; I > can infer that PHP is expecting OpenLDAP (whatever that is) and perhaps is > incompatible with IBM's LDAP? > > Please help or give a pointer to someone that knows...I'm at a standstill on this... > > The details =============================================== > > =====2) but ldap fails > "ldap.c", line 216.9: 1506-045 (S) Undeclared identifier LDAP_OPT_RESTART. Okay, it looks like your LDAP header files doesn't include this. Perhaps you could check in ldap.h. This should be defined if you have a modern API like specified in draft-ietf-ldapext-.... PHP only tries to use this when your LDAP header file sets LDAP_API_VERSION to > 2000 or if you have Netscape/iPlanet LDAP. It looks like your API falsely claims to follow the new specification (it's not alone). It probably supports parts of it though. I suggest you look for LDAP_API_VERSION in your ldap.h and check what it is set to. If you find it, try to comment it out and see if PHP builds (alternatively you could use #undef in PHP's ldap.c and php_ldap.h). I might also be able to make it support your API if you tell me what version etc. and you either give me the ldap.h header file or point me to some docs. You should perhaps also check if there is a newer version of the library available. Stig -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
