InstallationSince version 1.5, SabreDAV ships with a CardDAV plugin. The plugin comes in a separate package. If you installed the zip file, you should already have the CardDAV source files. If you installed SabreDAV using pear, you might need to install it using the following command: pear install sabredav/Sabre_CardDAV Database setupExample sql files are supplied for postgres, sqlite and mysql. The latter two are officially supported and unittested. This example assumes you're using sqlite. Create a 'data' directory where you're going to store the sqlite database. mkdir data/ cat examples/sql/sqlite.* | sqlite3 data/db.sqlite We'll add 1 addressbook for the admin user. INSERT INTO addressbooks (principaluri, displayname, uri, description, ctag) VALUES
('principals/admin','default calendar','default','','1');Now, make sure the data/db.sqlite as well as it's containing directory are writable by the server. If you are lazy you could just do: chmod -Rv a+rw data/ Create the server endpointSimply run the following: cp examples/addressbookserver.php addressbookserver.php Test in browserTry opening the full url to your new server. Make sure you append a slash at the end of the url, without this the request will fail. Example: http://www.example.org/~every/sabredav/addressbookserver.php/ This url should prompt you with an authentication dialog. The default username and password are admin and admin. Get clients workingWhile Evolution will work pretty easily, as it's mostly just a WebDAV client that works with just vcards, Getting OS/X addressbook and iOS require more work. Both of these clients (tested with OS/X 10.6 and iOS 4) require the CardDAV server to run on the root of the server, and not deep in some subdirectory. This means you must either create a new named-based vhost, or run a webserver on a separate ip or port. If you choose to run SabreDAV simply on a different TCP port, do it on 8008, as iCal/AddressBook/iOS will check this port automatically. Sample apache configuration can also be found in the examples/ directory. Adding usersSabreDAV does not provide an administrative interface. While this may happen in the future, for now SabreDAV is mostly intended for developers. Adding new users is done directly on the database. In order to allow a user to log in, add them to the users table. You must also add them to the principals table to enable addressbook access. See also | |