Ldap – Apache 2.4 with PHP 5.5, LDAP in PHP not working

apache-2.2apache-2.4ldapphp5

I'm working with a server running Debian 7.4 and it's currently running PHP 5.5.12 and Apache 2.2.22. I'm attempting to upgrade to Apache 2.4.9 so that I can enable Perfect Forward Secrecy.

I downloaded Apache 2.4.9 as source and successfully compiled it with these flags:

./configure --enable-so --with-included-apr --with-pcre --with-ldap --with-perl

I also downloaded PHP 5.5.12 as source and compiled with theses flags:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-pdo-mysql=mysqlnd --with-openssl --with-gd --with-zlib --enable-shmop --enable-sockets --enable-sysvsem --enable-sysvshm --enable-mbstring --with-iconv --with-litespeed --with-ldap --with-mcrypt

I've done all of the necessary configurations (httpd.conf, etc) to Apache 2.4 to enable Perfect Forward Secrecy and enable all of the necessary modules (I think). I intentionally installed Apache 2.4 into a different directory from Apache 2.2 so that I can shutdown Apache 2.2 and start Apache 2.4 (it's a production server, can't afford downtime). Everything works great when I start Apache 2.4, except connecting to an LDAP server using PHP. No errors are thrown, it simply doesn't work; it's like it's timing out. The strange thing is that when I switch back to Apache 2.2, LDAP in PHP works just fine. Does anyone know why this may be happening?

Best Answer

I ended up solving this myself. The problem was actually file/folder permissions; I have a script that uses an exec() hack to ping several LDAP servers, and the ping function was unable to write to the tmp folder. LDAP was working fine the entire time, this was the source of the problem.

Related Topic