Features (! means new in 2.0)
- sync library attachment to any php enabled webhosting space (including freely available ones) through a php based WebDAV implementation. This means that you attachment data never has to be stored on computers (clients and servers) that you do not control yourself.
- ! access your zotero library through zotero.org server API, including sorting, detail view, custom number of items per page etc
- ! view your synced attachments from any web browser without having to use zotero.org’s own storage server
- ! unlike zotero.org’s own attachment viewing feature, phpZoteroWebDAV allows you to view web snapshots as well
- Download phpZoteroWebDAV 2.0 (md5=50ff48cb0f6bf1326bcaea551c76edcc) directly from this site. Note that while I strive to keep this download link up to date, some minor updates might not be included yet. Therefore, if you want to ensure to use the most up-to-date code, use the github link below.
- phpZoteroWebDAV is on github, so if you want to make modifications to the code, you can fork it there. This repo also contains always the most recent version of the code.
Simply unzip the zip file you just downloaded and upload it to your webspace (you might want to complete the steps in the server part of the configuration instructions below first), e.g. to www.example.com/zotero. You must make sure that both the “data” and “cache” are writable by the user that runs your php process (ask your hosting service and/or google if you don’t know how – chances are good that you don’t need to do anything) and I would strongly suggest to password protect the directory that you just uploaded your script to (for example using .htaccess – again, google how or ask your hosting company) – otherwise your data will be accessible for everybody who knows/guesses the URL.
In the above example, www.example.com/zotero will be the address you use to access your library view and the attachments.
There are two parts to configure: the server site (i.e. the settings for the script itself, contained in the file settings.php) and your zotero client. I will walk you through both parts:
1. Server Configuration
The zip file you just downloaded and unzipped contains a file “settings.php”. Open this file with your favourite text editor. The parameters that MUST be set are the first two: $API_key and $user_ID. Navigate to https://www.zotero.org/settings/keys to get these values (you might have to sign in to your zotero.org account). On that page you see “Your userID for use in API calls is….” – the number that follows here goes in $user_ID. The you need to “Create new private key” for the script to use. Give it only as much power over your library it needs: the script only needs read access to your personal library, so you can disable everything else (have a look at this screenshot for the correct settings). Once created, copy and past the key into $API_key. Now you can have a look at the other settings (but you can also just keep defaults) and once save the settings.php file and upload it to your webserver. That’s all for server settings.
2. Client Settings
In your zotero client (i.e. in firefox or standalone zotero), open the sync tab in the preferences. In the “File Syncing” section, select “WebDAV” from the list. In the URL field make sure you select “http” instead of “https” unless you are very very sure that the ssl on your webserver is set up correctly. In the address field enter the URL that points to the directory to which you just uploaded the script (e.g. www.example.com/zotero) and then add “/webdav_server.php”, so that the whole path (including the “/zotero” suffix that cannot be changed) would be www.example.com/zotero/webdav_server.php/zotero
For username and password use the values that you created when setting up password protection as I advised you above. It is important to note that even if you ignored my well meaning advice and did NOT set up password protection for that directory, you still need to enter something in these fields.
Once this is all set up, you should be able to “Verify Server” and make your first sync, after that you can try and access your library and the attachment though this script.
Answering to requests I received, there is now also a live demonstration installation of the library and attachment viewer on my site.
Good luck and share any successes or failures (including detailed description of what is going wrong) either here or on the relevant thread at zotero.org (chances might be higher you get a reply there).
If you want to read about background and motivation for this project, there is another blog post related to that.