Skip to content

02 Requirements

Shubhra Prakash Nandi edited this page Aug 2, 2026 · 20 revisions

Host

HTTP server

Requires support for WebDAV methods and PHP execution support either natively or via FastCGI proxy.

  • Apache2
  • Nginx

Sync database

Requires a relational database with transaction, referential integrity (foreign keys), triggers and PHP PDO driver support.

  • MariaDB / MySQL
  • PostgreSQL
  • SQLite

Support for the following is planned

  • Oracle
  • SQL Server

PHP / PHP-FPM

  • Version 5.6 or higher
  • Version 7.1 or higher recommended for better vCard v3.0 compatibility with vCard v4.0

Caching

The following backends are supported

  • Local filesystem
  • Memcached
  • APCu
  • Memory

Disk space

Installation

  • Minimum 10 MB free
  • Recommended 50 MB free

Memory

  • Minimum 128 MB
  • Recommended 512 MB

System clock

This application uses UNIX timestamp of the system to synchronize changes between the clients and the backend. Make sure the system clock shows correct time or is periodically synchronized with a NTP server.

Backend

Requires directory server with LDAP v3 support.

  • OpenLDAP

Note: Other products may also work but have not been tested.

Configuration

Debian 11 GNU/Linux system is used as a reference for names here.

HTTP server

Apache2

Enable the below modules.

php7.4
setenvif
headers
socache_shmcb

Contents of virtual host configuration file (example for a minimal setup) is given below.

<VirtualHost *:80>
ServerName ldap-carddav
ServerAdmin admin@example.org

# Replace the place holder <app_dir> everywhere in this conf file with the
# absolute filesystem path of the application directory without the trailing
# front slash.

DocumentRoot "<app_dir>"

DirectoryIndex index.html
Options -Indexes

AliasMatch "^/.*$" "<app_dir>/server.php"

<IfModule php_module>
# If using mod_php

# Needed PHP flags.

# Error logging
php_flag log_errors on
php_flag display_errors off
php_value error_log /var/log/apache2/error.log

# Output buffering needs to be off, to prevent high memory usage
php_flag output_buffering off

# This is also to prevent high memory usage
php_flag always_populate_raw_post_data off

# This is almost a given, but magic quotes is *still* on on some
# linux distributions
php_flag magic_quotes_gpc off

# SabreDAV is not compatible with mbstring function overloading
php_flag mbstring.func_overload off
</IfModule>

<IfModule !php_module>
# If not using mod_php
SetEnvIf Authorization "^(.*)$" "HTTP_AUTHORIZATION=$1"

# Add PHP flags defined above to FastCGI server.
</IfModule>

# Deny access to all files/directories in application directory by default
<Directory "<app_dir>/">
Require all denied
</Directory>

# Allow access only to required files in the application directory
<Directory "<app_dir>/server.php">
Require all granted
</Directory>

<Directory "<app_dir>">
DirectoryIndex server.php
</Directory>
</VirtualHost>

Refer to SabreDAV documentation here - https://sabre.io/dav/webservers/ for more information.

Sync database

Default configuration is OK for supported products for sync database. In case the below is/are not part of default configuration of the database product it needs to be applied.

Mysql / MariaDB

Set the following server variables.

[mysqld]
default_storage_engine = InnoDB

Clone this wiki locally