phpZoteroWebDAV 2.0 - php based WebDAV server and library and attachment viewer
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
When I try to sync now however I get the following error message:
Unexpected status code 509 in Zotero.Sync.Storage.WebDAV_getStorageModificationTime()
Any ideas?
there is no way to be certain, but this sounds like an HTTP error from your server; 509 is "Bandwith exceeded" - maybe your PHP server doesn't like the type of traffic zotero is creating (from your previous problem it appears that your php server has been compiled with unusually restrictive options).
I am not sure how I can help you any further without having access to your server for trouble shooting. Hope you can figure something out.
Christian
I have this problem:
"AN ERROR HAS OCCURRED! - Unable to proccess zipfile """
can you help me?
thanx
But as I have to work on different computers and have almost 500 items in my library, is it possible to show them through tags or collections? And to sync the notes? So I won't need to install zotero and sync the library everywhere.
Thanks! I love this stuff!
I cannot verify the server and get the "is not a valid WebDAV URL" error. I tried the override using about:config settings as mentioned elsewhere, but still have no luck syncing the library. Any ideas?
Only one thing I found is that there are 2 types of pdf attachments, file links and file copies. It seems that the linked files are not synced to the server (which makes sense since you have the link), only the file copies are. For the file copies I do get the "attachment on webdav server" URL. However, I'd like to be able to also access linked pdfs from webdav. Is it possible to get Zotero to sync linked files to webdav so I can access them through the script?
Another option would be to store the pdfs as copies, not linked files. I mostly use translators to get pdfs from scientific journals directly from the browser. By default the pdfs are then saved as linked files, is it possible get pdfs through browser translators and store them as file copies?
1. no, Zotero doesn't sync linked files ever - not via webDAV and not via it's own Zotero storage and it can't be done.
2. By default, Zotero translators save copies, not links. In fact, it's impossible to get Zotero translators to save links to files, so I'm not quite sure what you're seeing.
When adding an item through translator I get a pdf file which has a link displayed below the title in the pane on the right. These files do not get synced so I dont get an access through webdav link. When I manually add a pdf attachment to an item it wont have a link, and these files (file copies) do get synced.
I think this is the link mode 0 and link mode 1 difference in files when you look at attachments through the php script web interface. So what I would need is to have the translators save the pdf as a link mode 0 or copy.
Those files get synced by Zotero and no, they're not actually different from files that you just drag to Zotero, I don't know if/why the php script would treat them differently.
https://github.com/krueschan/phpZoteroWebDAV/commit/032b80d5fcf05ab608b779a63beb4435be09a6b3#diff-1
however, i've checked the code on the server and I have this same version..
It happened only to some of my library items. i took a look, found out the attachments (pdf file copy) are not synced to webdav_server, however, if i add the item again, it can be synced and everything works fine. this instability makes this system very hard to maintain.
if memory severs, click the sync button did not make the attachments sync to webdav_server(the bad items).
One minor issue: i use your script on an apache server on windows (a xampp installation). i figured out that $data_dir works only as relative path for me, not as absolute path.
if i try absolute path, i get
found oneAN ERROR HAS OCCURRED! - Unable to proccess zipfile ""
when trying to open an attachment (also, i dont make use of your php webdav implementation - i use my own apache webdav)
here is a link for download:
http://www.netge.org/home/attachments/article/9/phpZoteroWebDAV_somefixes.zip
p.s. i didnt make any changes on the php-webdav implementation
I'm frustratingly close to getting this to work I hope!
I can verify the server but when I start to sync it hangs and the icon spins forever.
Here's the end of the debug output (prior to this it has zipped the 2 files for upload and begins HTTP PUT for them):
(3)(+0000000): Invalid progress for request 'null/4CNHC98A' (3342336 < 3407872)
(3)(+0000000): Invalid progress for request 'null/4CNHC98A' (3375104 < 3407872)
(3)(+0019317): onStartRequest
(3)(+0000000): onStopRequest
(3)(+0000920): onStartRequest
(3)(+0000000): onStopRequest
It commences uploading the 2 zip files and fails on complete of upload, I have checked on my server and the 2 files are there but the zip files are corrupt (I have downloaded the files and tried to unzip).
My folder permissions on the server are 755 for data and cache I have also increased my php upload limit above the default.
Aside from output in the debug panel I'm getting the following in the error report, but not sure if it is related:
[JavaScript Error: "[Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIHttpChannel.responseStatus]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: chrome://zotero/content/xpcom/storage.js :: <TOP_LEVEL> :: line 2598" data: no]" {file: "chrome://zotero/content/xpcom/storage.js" line: 2598}]
Any thoughts?
thanks
http://blog.holz.ca/wp-content/uploads/2011/11/Zotero-API-key-permission-settings.png
Everything looks to work fine. The only thing which does not work, is showing content on these php scripts in my browser:
http://www.example.com/zotero/index.php
http://www.example.com/zotero/details.php
http://www.example.com/zotero/attachment.php
They are just completely blank screen, also if I make the whole zotero directory and its childs word writable. There are no errors in apache error log. Showed html-code of the index.php is
<<start code>>
<html>
<head>
<link rel="stylesheet" href="inc/css.css" type="text/css" media="screen" charset="utf-8"/>
</head>
<style type="text/css">
a { text-decoration:none }
</style>
<body>
<<end code>>
I am sure syncing of attachments is going okay, because I can find the synced attachments back in one of the zip-files in 'data'.
These urls are showing up well in my browser
http://www.example.com/webdav_server.php
http://www.example.com/webdav_server.php/zotero/
It would be nice if I could check my refs in every browser in stead of installing zotero on every browser I hop along. But if this does not work, I don't see any advantage of using this script over connecting to a decent normal webdav server.
Thanks for you effort anyway.
PS: I did some wild testing and found out that curl is not activated in php at my hosting. The script 'inc/phpZotero.php' now hangs at this part of the script:
<<start code>>
if (function_exists('curl_init')) {
$this->_ch = curl_init();
} else {
throw new Exception("You need cURL");
}
<<end code>>
Anybody knows an alternative code? url_fopen is enabled in my hosting.
I changed hosting and now curl is working and I get output in zotero/index.php, zotero/attachments.php, etc.
I did a lot of testing in the syncing between my zotero client and my new webdav server today. Things I found out are:
1. If I damage some data in webdav under data/zotero, syncing is not taking care of repairing it.
2. If I remove all data in webdav under data/zotero and cache mostly syncing is working and data from my client is synced to webdav, also the attachments. At least one time it did not work and I could only get a good sync from client to webdav by completely remove the scripts on webdav and start allover.
3. If I start a fresh browser profile (firefox in my case) syncing is apparently working most of the time, but often a red arrow next to the syncing arrow shows something is not right. All items from webdav after the sync show up in the client, including the names of the attach, but if I want to view the attach I get a response that they can't be find and if I want to locate them manually.
I also tested with a real webdav server, and the syncing was working flawlessly here. So for the moment my conclusion is that your script is not stable enough for me to use for my production work and I first start to use syncing with my regular webdav server provider. But I will keep an eye on the progress and wil eventually do some more testing again.
Thanks very much,
But fail during verify server.
If under data there is no directory called "zotero" then verify server asks if it should create no. It then returns with failure "-14".
If under data I manually create the directory called "zotero", then verify server runs indefinitely .
Any ideas?
If I look on the browser for the files:
/zotero/webdav_server.php -> index of files
/zotero/index.php -> index zotero metadata (very nice!)
But the syncing is not working. If I run the verify sever and there is no zotero folder on data it creates one which doesn't allow me to write on it (I don't know how to change the permissions)
If I manually create the folder it does allow me to write on it.
On both cases it does not verify the sever and throws an unknown error.
If I add a nonexistent.prop file in there it says that non existent file is reported to exist.
I don't know how to troubleshoot from here
thanks for your great software. I run your server for a research group within a government department, and our legal boffins would sleep easier if we could host our files ourselves.
It is very useful to sync individual libraries with your server. What would be involved for your server to support subcategories and group libraries?
Cheers from down under and thanks for your great work!
first off, many thanks for the great scripts!
The problem: I was having the issue of the empty attachment field when viewing an item of my library on the browser-based viewer (Firefox 26.0 on Win7) though everything was fine on the API side.
The solution: I found that hitting refresh fills the attachment field with all the info and links. (Maybe a timing issue ?)
I am having the same server verification problems others have mentioned getting the "is not a valid WebDAV URL" error. I don't have any files synced yet, but I can access the site using a browser without any errors. Any ideas?
Debug ID is D416227251
Thanks!
Trying to set up sync to phpZoteroWebDAV 2.0 - is this software still working with later PHP versions?
Host is running PHP Version 7.2.14, on Apache. Directory is .htpasswd protected.
WebDAV through browser works as expected, asks for and accepts credentials.
Clicking on "Verify" in sync gets a little green bar that ends quickly, no confirmation.
Forcing sync generates error:
Error is (several times):
[JavaScript Error: "err is undefined" {file: "chrome://zotero/content/xpcom/storage/webdav.js" line: 745}]
version => 5.0.60, platform => Linux x86_64, oscpu => Linux x86_64, locale => en-US, appName => Zotero, appVersion => 5.0.60, extensions => Zotero LibreOffice Integration (5.0.14.SA.5.0.60, extension)
Debug error is:
D1431775797
ReportID is:
1148916468
From the debug output, during sync Zotero auths okay but then gets hung up on:
(Debug ID D788088064)
(3)(+0000004): <?xml version="1.0" encoding="utf-8"?> /zotero/webdav_server.php/ HTTP/1.1 200 OK HTTP/1.1 404 Not Found
(3)(+0000002): HTTP GET https://zotero:********@XXXX.YYY/zotero/webdav_server.php/zotero/nonexistent.prop
(3)(+0000004): {}
(1)(+0000098): HTTP GET https://zotero:********@XXXX.YYY/zotero/webdav_server.php/zotero/nonexistent.prop failed with status code 200
If I create a dummy nonexistent.prop file, writable, the sync still fails:
(1)(+0000098): HTTP GET https://zotero:********@XXXX.YYY/zotero/webdav_server.php/zotero/nonexistent.prop failed with status code 200
with console output:
TypeError: err is undefined
Zotero.Sync.Storage.Mode.WebDAV.prototype.handleVerificationError<@chrome://zotero/content/xpcom/storage/webdav.js:745:7
From previous event:
oncommand@chrome://zotero/content/preferences/preferences.xul:1:1
Possibly unhandled rejection:
Thanks for any help.
JavaScript Error: "Your WebDAV server returned an HTTP 406 error for a PUT request.
If you receive this message repeatedly, check your WebDAV server settings or contact your WebDAV server administrator.
IHave run into no problems on the Windows 7 machines i use at work that are using also running standalone Zotero.