I have a server running Ubuntu 9.10, openLDAP and phpldapadmin. The latter has the ability to use templates to streamline node creation and I want to use a custom template as described here.

My installation (which was done by apt-get) seems to be located at /usr/share/phpldapadmin/, but instead of containing a templates subdirectory, it contains a symlink to /etc/phpldapadmin/templates. True to form, this directory is locked down. When I break in, I'm greeted with a stark absence of any actual templates, let alone the example.xml file I've been instructed to crib from.

Does anybody know where I ought to place my custom templates? (Bonus points if you can tell me where to find example.xml.)


I'm an idiot. The permissions were all whack, but the templates were in two subdirectories: creation and modification.

After changing the permissions, it's possible to copy example.xml (or any template) and create new ones.

Be sure to set the permissions on the new file correctly though. Oh, and purge the cache!

  • 1
    Also, the part of the templates docs that says Don't worry about any other files or subdirectories (like creation or modification) is a foul lie. phpLDAPAdmin, at least on Debian 6.0.6, won't read templates in the top level templates/ directory and silently ignores them. – Craig Ringer Feb 20 '13 at 4:37
  • Also, use xmllint (from libxml2-utils) to check your templates if they're stubbornly failing to appear even after you remove the regexp element, check file permissions, etc. Eg xmllint --dtdvalid template.dtd custom_Staff.xml – Craig Ringer Feb 20 '13 at 4:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.