[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: OpenLDAP, PHP and OS X



Quinn Perkins wrote:

> I successfully built a version of PHP 4.0.6 for OS 10.1 with the instructions found at http://developer.apple.com/internet/macosx/php.html. It compiled without error using:
>
> ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --with-apxs --with-zlib --with-
> ldap=/Users/quinn/Desktop/Services/ldap/ldap --disable-pear --enable-trans-sid
>
> After moving the libphp4.so and editing the httpd.conf file, I started the web server, but got the following error:
>
> dyld: /usr/sbin/httpd Undefined symbols:
> _ldap_add_s
> _ldap_bind_s

...

>
> _ldap_value_free_len
> /usr/sbin/apachectl start: httpd could not be started
>
> Now...my OpenLDAP works fine. My PHP with LDAP compiled without error. Anyone have any ideas as to what might be wrong?
>

Your PHP module cannot find the OpenLDAP library when Apache starts.
You need to specify the path to the library (libldap.so*) for the PHP module. I am not a big expert in PHP nor in OS X, but it is either done by adding something
(extension_dir ?) in the php.ini file, or by adding the location to the LD_LIBRARY_PATH. It could be also ldconfig, if OS X uses FreeBSD-style loader.

Regards,
    Konstantin.

--
         * *       Konstantin Chuguev           Francis House
      *      *     Application Engineer         112 Hills Road
    *              Tel: +44 1223 302992         Cambridge CB2 1PQ
D  A  N  T  E      WWW: http://www.dante.net    United Kingdom