Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Httpd libphp5.so ldap error

Solved by Julz

Thank you!

$ brew uninstall php56
$ brew install php56 --without-ldap

So, I'm in need of some help, I've looked around, but I can't find anything to fix the problem.

I've installed Apache and PHP via Homebrew, but for some reason they don't seem to work together.

Apache is installed with httpd24 --enable-rewrite --enable-ssl --with-privileged-ports --with-http2 via the Homebrew/apache tap

PHP is installed with php56 --with-homebrew-apxs --with-apache --with-homebrew-curl --with-homebrew-openssl via the Homebrew/homebrew-php tap

And they all installed correctly, I load the libphp5.so in httpd.conf; Like you do, and when i run sudo httpd -k start / restart I get this:

httpd:
Syntax error on line 173 of /usr/local/etc/apache2/2.4/httpd.conf:
Cannot load /usr/local/Cellar/php56/5.6.20/libexec/apache2/libphp5.so into server: 
dlopen(/usr/local/Cellar/php56/5.6.20/libexec/apache2/libphp5.so, 10): 
Symbol not found: _ldap_control_find
Referenced from: /usr/local/Cellar/php56/5.6.20/libexec/apache2/libphp5.so
Expected in: /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP
in /usr/local/Cellar/php56/5.6.20/libexec/apache2/libphp5.so

I can't for the life of me figure out what's wrong, any help? Apache works fine without the php lib.

like image 541
Kim Hallberg Avatar asked Apr 05 '16 01:04

Kim Hallberg


People also ask

What happens when LDAP is used on a busy server?

On a busy server it is possible that many requests will try and access the same LDAP server connection simultaneously. Where an LDAP connection is in use, Apache will create a new connection alongside the original one. This ensures that the connection pool does not become a bottleneck.

How to resolve APX auto configuration system error in PHP5?

Try libapache2-mod-php5 package, it'll probably resolve it. Show activity on this post. First find out the location of apxs (apache auto configuration system):

How do I Find my PHP5 lib file location?

You want to type updatedb and then type locate libphp5.so. Show activity on this post. you should see the output of what is installing during the 'make install' phase. Look for your file there. Usually the target directory is /usr/local/lib (or /usr/local/lib64), so you can try 'find' utility to look for your file in there.

What are the advantages of LDAP connection pooling?

LDAP connections are pooled from request to request. This allows the LDAP server to remain connected and bound ready for the next request, without the need to unbind/connect/rebind. The performance advantages are similar to the effect of HTTP keepalives.


1 Answers

I upgraded php56 today via homebrew and had same pb. It seems to be related to ldap support.

Until a fix is provided I suggest uninstalling php56 then reinstalling without ldap

$ brew uninstall php56
$ brew install php56 --without-ldap

Easy and quick.

like image 63
Julz Avatar answered Oct 08 '22 19:10

Julz