note that when you build shared libs on solaris at least that you create a library with not all of its symbols resolved... if you do a ldd libldap.so and see file not found, then you would have your problem found. aix will by default attempt to resolve every symbol before it can create an executable/shared object, but can be changed with some switches.
your php error... do ldd libphp.so, and look for file not found. do not use -r.
if you do the same on liblber.so, you may see __eprintf is missing (depending on -lgcc was included in your linked libs)
when using the ldap libs, you should have to use -lldap -llber for any program that needs ldap libs then you shouldnt have any problems (i hope)
i place my libs in /usr/local/lib and pass to gcc/ld -R, which tells the linker to search in the colon separated path for libraries. i had to use GNU binutils to get openssl0.9.6b to build correctly, but removed it for all other apps.
does apache or php crash on calls to ldap functions? we also have apache1.3.20+php4.0.6+mod_ssl+mod_perl+auth_ldap and its all working...
you configure options for php included the path to your openldap install base dir?