I have about 5 servers that I maintain to run websites. In addition to the base system that DirectAdmin installs I have a requirement for a few additional modules.
These are memcache and LDAP.
I use Debian x64 and DirectAdmin, to try and keep things the same. So if it works on one, you test it on one… it should work on the others right?
Every time I upgrade PHP I have issues getting these two modules compiled back in (add custom modules).
I upgraded one server to PHP 5.6.8, using CustomBuild 2.0 I enabled LDAP. So my custom/ap2/configure.php56 looks like this, to add LDAP:
#!/bin/sh ./configure \ --with-apxs2 \ --with-config-file-scan-dir=/usr/local/lib/php.conf.d \ --with-curl=/usr/local/lib \ --with-gd \ --enable-gd-native-ttf \ --with-gettext \ --with-jpeg-dir=/usr/local/lib \ --with-freetype-dir=/usr/local/lib \ --with-libxml-dir=/usr/local/lib \ --with-kerberos \ --with-openssl \ --with-mcrypt \ --with-mhash \ --with-ldap \ --with-mysql=mysqlnd \ --with-mysql-sock=/tmp/mysql.sock \ --with-mysqli=mysqlnd \ --with-pcre-regex=/usr/local \ --with-pdo-mysql=mysqlnd \ --with-pear \ --with-png-dir=/usr/local/lib \ --with-xsl \ --with-zlib \ --with-zlib-dir=/usr/local/lib \ --enable-zip \ --with-iconv=/usr/local \ --enable-bcmath \ --enable-calendar \ --enable-ftp \ --enable-sockets \ --enable-soap \ --enable-mbstring \ --with-icu-dir=/usr/local/icu \ --enable-intl
Great, it works. LDAP is compiled in and everyone is happy.
I go and do the upgrade on the next server, no luck. The compiler for PHP says it can’t find the LDAP files. I check what ldap modules are installed on both machines with this:
dpkg-query -l '*ldap*'
Both machines show different results, the packages are mostly the same, but not exact. In fact the output of the dpkg-query is not the same, one shows an Architecture column and one does not. Hmmm… is one 64 bit and the other 32… checking on that… nope, both are 64 bit.
In the end on the machine with the issue where it says it can’t find the LDAP files I created a symlink to a ldap file I found.
ln -s /usr/lib/x86_64-linux-gnu/libldap-2.4.so.2 /usr/lib/libldap.so
That was enough that it could compile and things seem to be working, but super frustrating that there are so many differences on machines where I try and keep things the same.
To have DirectAdmin monitor the status of the memecached instance you can add it to /usr/local/directadmin/data/admin/services.status and DirectAdmin will start/restart if necessary.
The DA guys document it here: http://www.directadmin.com/features.php?id=487