Not signed in (Sign In)

Quick Links

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorkrueschan
    • CommentTimeNov 13th 2008 edited

    Since this might be of relevance for others, I would like to share this.
    Basically, this is user installable php based WebDAV server, that serves 'through' php - in other words, you can use it with hosting plans (read your TOS - some hosting providers explicitly disallow using their services for file storage) with standard php enabled webserver (that's most hosting plans).

    This might be useful for people who don't have access to a WebDAV service or (as in my case) whose WebDAV server uses ports that are blocked by their institution's network firewall. It can also be useful for people who don't want to sign up for any paid WebDAV service while there are so many free php enabled hosting packages available.

    In order to install it, just simply download the zip file from the location quoted below and upload the contained directory 'zotero' to your website, e.g. to

    You must then make sure that the directory 'zotero/data' is 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 'zotero' (for example using .htaccess - again, google how or ask your hosting company) - otherwise your data will be accessible for everybody.

    Now, the address to enter into your zotero sync preferences would be (so that the full address would be and your data will be stored under For username and password enter whatever you set up for your directory in the previous step or enter anything if you decided not to protect the directory (I would seriously not do that, though).

    DISCLAIMER: I do not accept any liability for any damage arising from the use of this script. You use this under your own risk. You are also solely responsible to ensure that your use of the script does not violate any copyright or other rules, for example, but not limited to, the TORs of any webhosting package you might decide to use with this script. The implementation is based on the sample implementation of the PEAR WebDAV server module by Hartmut Holzgraefe and uses said module as well as the PEAR base module, both licensed under PHP license. Versions of these modules are contained in the zip file.
    DOWNLOAD: download phpZoteroWebDAV (148k)

    Good luck and share any experiences.
    • CommentAuthorplayagiron
    • CommentTimeJan 23rd 2009
    Hi thanks for the description. Indeed many universities restrict Internet access severely so I really look forward to the final Version of Zotero 1.5. to use with WEBDAV.
    After following your great tutorial to install a webdav server on one's webspace using php I just have the problem that I get the message
    Warning: require_once(HTTP/WebDAV/Server/Filesystem.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/web176/html/zotero/webdav_server.php on line 6

    Fatal error: require_once() [function.require]: Failed opening required 'HTTP/WebDAV/Server/Filesystem.php' (include_path='.') in /var/www/web176/html/zotero/webdav_server.php on line 6

    Acknoledging that I have not so much of PHP experience, probably the problem is the include of the Pear packages?? But since many hoster don't allow to modify the php.ini, could you maybe also provide a version for this case which I think applies to many hosters. (Probably by using the init set command but I tried - without success).

    Anyway many thanks!

    • CommentAuthorkrueschan
    • CommentTimeFeb 9th 2009 edited
    Hi Johannes,

    Sorry for not replying earlier - lots to do; I am sure you know how that feels.

    Your error messages suggest that the line in the script that sets the include path has not been executed. The command used only works for PHP versions 4.3.0 and above.

    To solve this, replace the line "set_include_path..." in your webdav_server.php with "ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . $path_to_pear);"

    This should solve the problem, but it is possible that you use a php version even too old for that (and PATH_SEPARATOR not defined in your version), in that case just download the whole script again (I changed the code in a way that should work for all PHP versions) and replace your webdav_server.php with the new version. Note the disclaimer that comes with the script in the first post of this thread.

    Let me know if this did the trick.

    P.S. You are right that the access to PEAR is the important bit. However, as I know the problem with PEAR and various hosters, I included all relevant PEAR packages in the inc directory of the phpZoteroWebDAV package. ini_set is the way to make php include those packages. I don't know what specific ini_set commands you run; the one included above should append "inc" to your include path, thus helping php to find the PEAR packages. As an alternative, you could just move everything from within the 'inc' directory into the same directory as your webdav_server.php file (maintaining the relative directory structure, though) - in that case the PEAR packages would be in a location your current include path ('.') points to.
    • CommentAuthorphilgons
    • CommentTimeFeb 12th 2009
    Wow. This is awesome. Thanks, Christian!
    • CommentAuthorplayagiron
    • CommentTimeFeb 27th 2009
    Hi Christian,

    thank you very much for your reply. But it still doesn't work for me. Still get the same message (just now both errors refer to line 7).
    Moreover, the change of the init line is already incorporated in the new ZIP file right??
    And I am running PHP Version 5.2.6, so so far no clue what is the problem.
    But I am not quite sure about what you mean regarding the including of PEAR. Since I just have a web host provider, I cannot manipulate the php.ini myself and so the inlcude should do the trick but apparently it doesnt. Moreover, I am not quite sure if I move the inc Folders to "my" root directory (/html) that it would be included.

    Actually, i also tried it on a second webserver and got the same problem.
    Maybe if oyu had an idea what else try would be really appreciated - if your research lets you some time of course ;-)


    • CommentAuthorkrueschan
    • CommentTimeMar 1st 2009 edited
    Alright Johannes,

    let's have another try. My guess is now that when you run the script, the working directory is not the directory where the script is based but some other directory (the document root, the directory where the php binaries are located...). Since both previous versions of the script used relative paths to point to the required PEAR modules, this would have to fail.

    Therefore, the script now changes into the 'inc' directory before initiating the webdav server instance. This should work now even without using include paths.

    Download the new version of the script and let me know how this works for you. Also, if it doesn't work, please try this alternative version (which still uses the "include_path" method but this time with absolute rather than relative path). In either case, please post any error messages you recieve. Also note the disclaimer that comes with either version of the script in the first post of this thread.


    P.S. what I meant with moving the PEAR modules was to move everything from inside the 'inc' directory one level up, ie to the same level as the webdav_server.php - however, this will not work anymore with the new version of the script.
    • CommentAuthorbhy
    • CommentTimeMar 3rd 2009

    There's also GAEDav ( to let you setup WebDAV server on Google App Engine!
    • CommentAuthorkrueschan
    • CommentTimeMar 4th 2009
    Thanks for sharing this link. Setting up WebDAV on google apps would be rather sweet. However, I find the website you linked to lacks any documentation. Do you have some more hints how to set this up or websites with instructions? Thanks.
    Hi Christian,

    thanks!! works perfectly the NEW version, easily, so now can't wait for the beta to become official!! Great job!

    Cheers, Johannes
    • CommentAuthormarksample
    • CommentTimeMar 14th 2009
    Thanks, Christian! The php webdav server turns out to be the perfect solution, now that has disabled webdav access for Zotero. Right now I'm happily syncing my 261 pdfs and snapshots onto my own server space, thanks to your self-contained little package. I only had one minor installation problem, and that was remembering to select http over https in my Zotero sync preferences (my SSL is now working for some reason on my web host). Thanks, again.
    • CommentAuthorkrueschan
    • CommentTimeMar 17th 2009 edited
    Great. Just let me be boring for a second and provide a word of caution. If you use this little script with your web hosting package, refer to the TORs of your package. For a while, I was (albeit unsuccessfully) searching for a web hoster that did not explicitly disallow the use of their services for backup and other file storage purposes, so I could use it for zotero storage sync and similar purposes without breaching the TORs.

    Now, of course you could still do it and in my experience the worst thing that can happen is that they ask you to delete these files (or delete them themselves) threatening the termination of your account. For zotero sync that should not be too much of a problem, since the purpose is short term syncing and not long term safe storage and usually 'they' give you a couple of days to comply with their request.

    (since the TORs usually specify that your are not supposed to put files there that are not linked to a website, it might be a good solution to put an html/php page "up there" that contains a list of all items in your zotero library linking to the attachment in the file sync store. This would then create compliance with (at least the letter though probably not the spirit of) the TOR and would be a neat feature anyway. IF I find some spare time, I might put something like that together one day...)
    • CommentAuthorkrueschan
    • CommentTimeApr 23rd 2009 edited
    ermmm.... this is a bit embarrassing... but could someone who previously downloaded the phpZoteroWebDAV server please email me the zip file with the phpZoteroWebDAV package, as previously made available by me on my webserver? I had a server crash last week and a very very sloppy backup regime (blush) and now I don't have this anymore. Would suck to have to create it from scratch again.
    Email is -------
    This is very much appreciated!

    edit: ended up putting everything together again. the zip file is back to where it was. as before: share any comments or installation problems - I'll try to fix it.
    • CommentAuthormadsjensen
    • CommentTimeApr 23rd 2009
    i would love af copy to...


    • CommentAuthorkrueschan
    • CommentTimeMay 2nd 2009
    Just to announce that after my server crash last week the phpZoteroWebDAV server is back and can be downloaded from the link in the first post of this thread.
    • CommentAuthordbogdanov
    • CommentTimeMay 4th 2009
    thank you very much!

    i installed the script, but i get -15 error while verifying the server
    what does that mean?

    cheers, dmitry
    • CommentAuthornoksagt
    • CommentTimeMay 4th 2009
    As in the other thread: -15 is an unknown error & you'd have to look at debug output. It may be that your webhost doesn't like you uploading a lot of big files or throws some other error when you try to use the script.
    • CommentAuthorkrueschan
    • CommentTimeMay 5th 2009
    you should first make sure that your installation of the script works properly. To test, enter the URL of the script in your browser address bar, e.g.
    If that doesn't throw any errors, the script is properly installed. In that case, I would still test, just to make sure.
    Also, test your script installation with a WebDAV client (e.g. - can you upload, download, delete, rename, overwrite files ok with that client and your installation?
    Let us know any error output (both from browser and webdav client) if any.
    Good luck!
    Hi, I'm trying to set up a WebDAV server using my university webspace, but it doesn't appear to be working. I get this output when I enter "/***/zotero/webdav_server.php"

    chdir (dirname(__FILE__) . "/inc");

    require_once "HTTP/WebDAV/Server/Filesystem.php";
    $server = new HTTP_WebDAV_Server_Filesystem();

    $server->ServeRequest(dirname(__FILE__) . "/data");


    The directories /inc and /data are definitely present. Any help would be much appreciated!
    • CommentAuthornoksagt
    • CommentTimeMay 5th 2009
    That is just the source code to the script. Perhaps you're not allowed to run php scripts on the server, or at least not from the directory you currently have the script in?
    I think you are right, I'm probably not able to run php scripts. I'll have to e-mail someone and check that out. Thanks!
    • CommentAuthorkrueschan
    • CommentTimeMay 5th 2009 edited
    Hi jollywollup,

    Thanks for posting this error. There was indeed a tiny coding error - the first line should read "<?php" instead of "<?". Some webservers (including mine - that's why this went unnoticed) are clever enough to figure out what is meant anyway, but others require correct coding (fair enough). So change this in your webdav_server.php (or download the fixed version of the script) and check again. This could also be the solution for dbogdanov's problem.

    However, as noksagt pointed out, there might still be the problem that your university doesn't allow you to run php programs (which is, based on my own experience with university hosting, not unlikely). In that case you might want to ask the allmighty google to point you towards some free php enabled web hosting.

    Good luck,
    I found out for sure that php is not allowed on my university filestore, so I signed up for a free php hosting site. However, I am still getting errors when I try loading the webdav server. I can tell I'm getting closer, though. :-D

    This time, /zotero/webdav_server.php gives me:

    Warning: require_once(Console/Getopt.php) [function.require-once]: failed to open stream: No such file or directory in /***/zotero/inc/System.php on line 23

    Fatal error: require_once() [function.require]: Failed opening required 'Console/Getopt.php' (include_path='.:/usr/lib/php') in /***/zotero/inc/System.php on line 23

    Thanks again for any help on this.
    • CommentAuthorkrueschan
    • CommentTimeMay 7th 2009 edited
    Hey Jollywollup,
    Yes. That makes sense. Again a case of my server setup being too robust to trigger this sort of issue. Bear with me a day or two until I have that fixed - I will do a bit more thorough testing this time (in fact - if you tell me what free service you signed up with - I could use that for testing)
    Sorry for the problems and thanks for letting me know the error messages.
    • CommentAuthorkrueschan
    • CommentTimeMay 8th 2009
    I have changed the zip package again, to take into include any fixed bugs that have been found by users. Thanks for sharing those error messages.
    Hey Christian,

    I installed the package to my webspace without difficulty. I know I can use php scripts (I use them for other content management packages), but when I try to put the correct URL into the box, it simply says ""/zotero/webdav_server.php does not exist. I have verified, of course, that it has been uploaded, and I can access the index.html file within the directory. Any ideas? Thanks!
    • CommentAuthoreddierm
    • CommentTimeJun 28th 2009
    Hey... this is great!!! thanks a lot for this!!!
    • CommentAuthorswietowid
    • CommentTimeJul 2nd 2009
    This is really awesome. Very easy setup. Works great with zotero.
    One question though:
    When I connect to webdav using gnome built in dav plugin the file names are displayed in caps and with the directory in them for example all files in /zotero/ directory look like "/ZOTERO/FILE.ZIP"
    Any idea why?
    • CommentAuthornoksagt
    • CommentTimeJul 2nd 2009 edited
    ZIP/PROP files are normal & should be in all-caps:

    The 'zotero' directory name and the '.zip' extension should be lowercase on filesystems/operating systems that are case sensitive.
    I obtained an S3 account only to discover that persons outside the U.S. apparently cannot sign up for the Amazon Payments system required to purchase Jungle Disk. I like S3 as a storage solution, but to sync Zotero I need a way to derive WebDAV URLs for the folders that I create on S3.

    So, one question for Christian: if I install your script on a PHP-enabled web server, can I configure it (reasonably easily) to use my S3 storage instead of the web server's storage?

    And a general question for anyone: do you know of a product or service OTHER than Jungle Disk that will create WebDAV URLs for folders on S3? (In other words, I want to continue using S3 as the actual file depot, but I need a way to get Zotero to access those files.)

    Thank you.
    • CommentAuthorCB
    • CommentTimeJul 3rd 2009
    Toby: Are you sure? I have a Jungledisk account, payed for via Amazon payments, and I live in Australia. I'm not using S3, as the Rackspace option is cheaper (no bandwidth charges).

    You should have another look -- I've found the Jungledisk/Rackspace combination trouble-free and extremely cheap.
    Hi CB. I wouldn't rule out Rackspace over S3, but Jungle Disk and Amazon Payments are my roadblock right now. On the "Sign Up for Amazon Payments" page, it requires me to identify a US state and zip code, without which I cannot proceed. Jungle Disk explicitly acknowledges this problem, but their solution does not work. (And in any case, to my knowledge I don't have a Mechanical Turk account.) I've read about others having the same problem. Do you remember how you got past it?
    • CommentAuthorCB
    • CommentTimeJul 3rd 2009
    That's really quite weird on Amazon's part. I can't help because I didn't have any problem signing up in the first place.

    You have me as an instance proof that it's at least possible, so perhaps it's worth persuing.
    I've found Amazon's customer service quite responsive, if only intermittently competent, in the past (if you can find their support form which they bury quite deep somewhere). Maybe you could ask them to help out?
    Response from Amazon Payments:
    In order to use Amazon Payments, you must have a U.S.-based bank account and a U.S.-based mailing address. All transactions processed through Amazon Payments are conducted in U.S. Dollars at this time.

    International customers can use a credit card to make online purchases with Amazon Payments through payment links offered by third-party websites, but they cannot use any other features at this time.

    We do plan to add support for additional countries and currencies over time. Please check the Amazon Payments site for occasional updates. We apologize for any inconvenience this may cause.

    So maybe my next stop is Jungle Disk. However I certainly don't recall seeing a "payment link" - rather they specifically direct you to get an Amazon Payments account.
    • CommentAuthorCB
    • CommentTimeJul 6th 2009
    Toby: I've had a quick look back through my emails from Amazon and Jungledisk to see if they indicated what exact process I went through at the time, but they're not that enlightening. I'm think though that I didn't do anything at Amazon's site independent of the Jungledisk sign-up process; that is, I must have been redirected to Amazon directly by Jungledisk.

    Looking at, it says:

    All billing for Jungle Disk products and services is handled by
    After creating an account you will be forwarded to the Amazon Payments site to complete the transaction.

    I think I just followed on from that form, and all was OK. Sorry I can't be of more help.
    Ok, WOW, do I wish that I had done that differently from step 1. Somehow instead of just clicking through the Jungle Disk sign-up, I had taken it into mind to first obtain an Amazon S3 account, and an Amazon Payments account. Or perhaps when I first clicked through the JD sign-up, I seriously misread things and went off on the wrong track.

    Finally I worked through the sign-up and found the link that took me to the JD "drive thru" version of Amazon Payments, where yeah, you just need a credit card.

    Thanks CB! You imparted sufficient belief that it must be possible.

    Zotero syncing is working fine now.
    • CommentAuthorwormie_dk
    • CommentTimeJul 10th 2009
    I tried installing on my webhost and everything seems fine. I can access: from my browser but when I try to connect zotero it says:
    "You don't have permission to access /zotero/webdav_server.php/zotero/ on the storage server. Please check your storage settings or contact your server administrator."
    I then tried logging in using a "normal" webdav client which works fine but I cannot store any files. I get a permission denied. All files/folders in the data directory are set to 777 in file permissions. Any ideas? :)
    • CommentAuthorphleung
    • CommentTimeAug 10th 2009
    This is a great idea. But I do facing some problems.

    I have installed it and the "webdav_server.php" works then in Firefox. And then, I use BitKinex to access it as an Webdav. It connects, but I have to type the address without "http:".

    Then when it comes to Zotero, it said "The storage server did not accept the username and password you entered. Please check your storage settings or contact your server administrator."

    Anyone ideas? :)
    • CommentAuthordcandusso
    • CommentTimeAug 23rd 2009
    Thanks for this method! It works brilliantly!
    • CommentAuthorschwitters
    • CommentTimeSep 15th 2009
    This is exactly what I have been looking for, but it still does not work for me. I installed it gave the data and zotero dir the chmod 777, but I still can't write on it. I can easily mount it from osx but no write access.

    Any suggestions?

    • CommentAuthordcandusso
    • CommentTimeSep 15th 2009
    When you verify the server (from the Zotero sync preference), does it say that it works? Also, make sure your directory hierarchy is set correctly. You may also wish to test it without the secure option first, just to see if it works.
    • CommentAuthorschwitters
    • CommentTimeSep 16th 2009
    Thanks for the suggestions, I tried it without htaccess, and have the hierarchy generated by the zip file. As I said, I can access it, as a webdav drive, but without write access.

    zotero tells me: "You don't have permission to access /xxxx/webdav_server.php/zotero/ on the WebDAV server. Please check your file sync settings or contact your server administrator."
    • CommentAuthoralewis
    • CommentTimeOct 4th 2009
    Free Webdav services:

    I signed up at - it was totally easy and it works. Remains to be seen whether it remains free...
    • CommentAuthorflaxter
    • CommentTimeOct 28th 2009
    Do people have this working with 2.0 beta? Specifically 2.0b7.4?

    • CommentAuthorkrueschan
    • CommentTimeDec 1st 2009
    sorry for not having posted to this thread for a while - my two babies (PhD and ..., well, my 'real' baby) needed a lot of attention lately.

    Here some answers:

    S3: I don't know if it is possible to connect to S3 with php (I guess it should be), but it would certainly require a major rewrite of this script and I am certain that I won't do that.

    For permission problems: note that you have to enter username and password in zotero even if you don't have htacess enabled. In this case, of course, it doesn't matter want you enter, but it seems that zotero needs something on these fields. So make sure you still enter something when testing without authentification.

    Re compatibility: I am using my installation of this script since sync preview version (1.5) and had no problem with the any zotero versions up to and including the current.

    Hope that helps.
    • CommentAuthormedioevo
    • CommentTimeApr 5th 2010
    I have the same problems with the finder. Finder in osx can't write on webdav server when it lacks locking support. Lock is something set to prevent double writing. Does anyone know how to set this in our case?
    • CommentAuthorkrueschan
    • CommentTimeApr 6th 2010

    The implementation of locking in the webdav server in php was too complicated and not worth it as zotero doesn't require locking to work. My goal was to keep the script as straightforward as possible to keep maintenance low. This is not meant to be a full webdav implementation, but rather a stripped down version that works with zotero. Finder is probably not the only program not working with it, but it wasn't intended to be used with it in the first place.

    If zotero will ever require locking I guess I will have to look into it, but until this hopefully never occurring time, I won't make any changes.

    Have a look at the webdav server implementation in PEAR (which this here script is based upon). I am relatively sure that they didn't implement locking either (or not fully functionally), but I might well be wrong and it's all there. Either way, chances are that somebody changed the webdav pear package since I last had a look and it's now all in order.

    Good luck,
    • CommentAuthormedioevo
    • CommentTimeApr 6th 2010
    Thank you!
    Your script is great. I'd like to add lock support but I'll try it myself.
    Your work is the best webdav 'ready to go' on the net.

    WOW! What a nice script, it worked out of the box... tried it with htacces, just works fine on the web browser.

    Then I tried it with my cellphone: I was able to upload/download files without being asked for any username/password.

    How come?

    Can you please assist?
    • CommentAuthorhubermic
    • CommentTimeSep 21st 2010
    Hi, just in case someone else faces the same problem as I did:
    At some web hosters, the ftp user is not the same as the php user. So if you upload the php scripts by ftp, their owner is the ftp user. In order to upload zotero files to the 'data' directory, this directory has to be owned by the php user. Otherwise you will get an error while trying to upload / sync files.
    got it working but have an additional request; Is it possible to change the default directory on my storage? now it is the /data/zotero folder. I would like to use some space outside the webspace.
    More would it be possible to have some kind of security?

Zotero Forums are powered by Vanilla 1.1.5a