Re: getting started - problems

642 views
Skip to first unread message

Evert Pot

unread,
Dec 19, 2012, 10:21:47 AM12/19/12
to sabredav...@googlegroups.com
Hi,

> the error looks like
> <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
> <s:exception>Sabre\DAV\Exception\NotImplemented</s:exception>
> <s:message>GET is only implemented on File objects</s:message>
> <s:sabredav-version>1.8.1</s:sabredav-version>
> </d:error>
>
> but not like in the manual
>
> where is my errror ?

This is actually correct, read about it here:

http://code.google.com/p/sabredav/wiki/GettingStarted

You can use the browser plugin to make it look pretty:

http://code.google.com/p/sabredav/wiki/CreateHTMLDirectories

Evert

mojoe

unread,
Dec 19, 2012, 7:56:40 PM12/19/12
to sabredav...@googlegroups.com
The line with file is missing and i can't connect with a Client -

The browser Plugin is working well and Show 2 Files

Evert Pot

unread,
Dec 20, 2012, 7:09:38 AM12/20/12
to sabredav...@googlegroups.com
Hi Mojoe,

What client are you using? What url are you using to connect?

Evert

mojoe

unread,
Dec 20, 2012, 6:34:13 PM12/20/12
to sabredav...@googlegroups.com
hi Evert, 

thanks for your replies - clint is Finder on Mac  - url ist dav.url.com 

same like in the browser to get the errror . 

thanks 

Evert Pot

unread,
Dec 20, 2012, 6:48:54 PM12/20/12
to sabredav...@googlegroups.com
Alright, in that case.. I need you to install Charles HTTP proxy (free evaluation) and start it.
Then try connecting with Finder.

You should see a number of requests in Charles that Finder is attempting to make. Either there's an obvious error visible in charles which you could just copy paste here, or if not: feel free to save the Charles session and send it to me.

Attachments don't work well on groups, so you can just send it to my email address.

Evert
> --
> You received this message because you are subscribed to the Google Groups "SabreDAV Discussion" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/sabredav-discuss/-/29lb8himeMwJ.
> To post to this group, send email to sabredav...@googlegroups.com.
> To unsubscribe from this group, send email to sabredav-discu...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sabredav-discuss?hl=en.

mojoe

unread,
Dec 20, 2012, 7:06:44 PM12/20/12
to sabredav...@googlegroups.com
i try Transmit also and get a 400 Bad Request 

mojoe

unread,
Dec 20, 2012, 7:09:30 PM12/20/12
to sabredav...@googlegroups.com
an other point what strange to me - 

i get an other error by calling dav.url.com/server.php 

<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DAV\Exception\NotFound</s:exception>
<s:message>
File with name public/server.php could not be located
</s:message>
<s:sabredav-version>1.8.1</s:sabredav-version>
</d:error>

sorry i`m a bit confused 

Evert Pot

unread,
Dec 20, 2012, 7:15:02 PM12/20/12
to sabredav...@googlegroups.com
If you setup mod_rewrite correctly, and your base url is /, then server.php is expected to not be accessible.

Then: follow my charles suggestion

Evert

Evert Pot

unread,
Dec 20, 2012, 7:49:57 PM12/20/12
to sabredav...@googlegroups.com
Just got the charles dump; and this error is showing:

<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
<s:message>The request body had an invalid XML body. (message: xmlns:D: 'DAV:' is not a valid URI
, errorcode: 99, line: 2)</s:message>
<s:sabredav-version>1.8.1</s:sabredav-version>
</d:error>

Now this is actually an error I've seen a lot of times before, a few years ago.
An older version of libxml (the XML library PHP uses) could not deal with the "DAV:" namespace, so I actually had a regex in place to automatically convert all these to 'urn:DAV', which was valid for libxml.

I had assumed this was no longer an issue, but this error tells me this is still the case; which sucks!

So I'm wondering:

* what operating system and version are you running?
* What version of libxml do you have? You can check this with phpinfo(). (I have 2.7.8 and 2.8.0 on different systems)
* Do you think you can upgrade this?

Evert

mojoe

unread,
Dec 20, 2012, 7:55:30 PM12/20/12
to sabredav...@googlegroups.com
linux webserver  with PHP Version 5.3.17

test on Mountion Lion with finder

* What version of libxml do you have? You can check this with phpinfo().  (I have 2.7.8 and 2.8.0 on different systems)
 2.6.32 :( 
* Do you think you can upgrade this?
no i can`t update that - don`t have the permission 
 

Evert

Evert Pot

unread,
Dec 20, 2012, 8:00:48 PM12/20/12
to sabredav...@googlegroups.com
> * what operating system and version are you running?
> linux webserver with PHP Version 5.3.17

What distribution specifically? Ubuntu?

>
> test on Mountion Lion with finder
>
> * What version of libxml do you have? You can check this with phpinfo(). (I have 2.7.8 and 2.8.0 on different systems)
> 2.6.32 :(
> * Do you think you can upgrade this?
> no i can`t update that - don`t have the permission

Alright, well since you are mostly doing file serving, you'll be fine downgrading to 1.6.5, which still has the libxml workaround. Most of the improvements in 1.7 and 1.8 are related to CalDAV and CardDAV.

Just keep in mind that it doesn't use namespaces, so your server.php will look a bit different.

I'm still quite curious about the operating system distribution and version though, depending on what it is will help me decide if I need to add the libxml hack again.

Let me know!
Evert

mojoe

unread,
Dec 20, 2012, 8:20:44 PM12/20/12
to sabredav...@googlegroups.com
1.6.5 work - i can connect by finder ! 

Evert Pot

unread,
Dec 20, 2012, 10:48:34 PM12/20/12
to sabredav...@googlegroups.com
On Dec 21, 2012, at 2:20 AM, mojoe <myk...@gmail.com> wrote:

> 1.6.5 work - i can connect by finder !

That's great to hear. If you can find out exactly which operating system and version you're running, it would be extremely helpful :)

Evert

mojoe

unread,
Dec 21, 2012, 8:57:58 AM12/21/12
to sabredav...@googlegroups.com
I`m sorry - i don`t found more detail about the operating system . 

not in the php.info either in the systeminformation of my hoster - there stand Managed Operationg system - not more 

al...@iguanaweb.com.br

unread,
Jan 9, 2013, 7:51:52 PM1/9/13
to sabredav...@googlegroups.com
 Hello Mojoe!

Navigating the wiki noticed you also had difficulties installing SabreDAV.

My folder structure is the same as yours.

/ server.php
/ public /
/ bin /
/ vendor /
/ lib /
/ data /
/. htaccess


Wonder if unable to resolve the problems and are using SabreDAV?


Sincerely;

Alan Pfeiffer


Em quarta-feira, 19 de dezembro de 2012 13h15min36s UTC-2, mojoe escreveu:
hi - it`s my first time with sabreDav, 

i try to follow the getting startet but struggle

my structure ist 

/server.php
/public/
/bin/
/vendor/
/lib/
/data/
/.htaccess

my server.php looks like 

<?php
use
    Sabre\DAV;

// Files we need

require_once 'vendor/autoload.php';

// Now we're creating a whole bunch of objects

// Change public to something else, if you are using a different directory for your files
$rootDirectory = new DAV\FS\Directory('public');
// The server object is responsible for making sense out of the WebDAV protocol
$server = new DAV\Server($rootDirectory);
// If your server is not on your webroot, make sure the following line has the correct information

// $server->setBaseUri('/~evert/mydavfolder'); // if its in some kind of home directory
// $server->setBaseUri('server.php/'); // if you can't use mod_rewrite, use server.php as a base uri
// $server->setBaseUri('/'); // ideally, SabreDAV lives on a root directory with mod_rewrite sending every request to server.php

// The lock manager is reponsible for making sure users don't overwrite each others changes. Change 'data' to a different 
// directory, if you're storing your data somewhere else.
$lockBackend = new DAV\Locks\Backend\File('data/locks');
$lockPlugin = new DAV\Locks\Plugin($lockBackend);

$server->addPlugin($lockPlugin);

//$plugin = new \Sabre\DAV\Browser\Plugin();
//$server->addPlugin($plugin);

// All we need to do now, is to fire up the server
$server->exec();

?>

the error looks like 
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DAV\Exception\NotImplemented</s:exception>
<s:message>GET is only implemented on File objects</s:message>
<s:sabredav-version>1.8.1</s:sabredav-version>
</d:error>

Rafael Alcántara

unread,
Jan 6, 2016, 6:04:20 PM1/6/16
to SabreDAV Discussion
Hi, Evert.

Long time has passed, and still I am getting exactly the same error as mojoe because of an old libxml (2.6.26 in my case, for SabreDAV 3.0.5), non-updateable either.
I intend to use it mainly for CardDAV and CalDAV, so I wish to keep the SabreDAV version. Would you point me to the regular expression you mentioned, and where to apply it, so that I can hack my installation and make it work?

Thanks,

Rafa

Evert Pot

unread,
Jan 6, 2016, 6:10:13 PM1/6/16
to SabreDAV Discussion
Hi Rafael,

Which error are you getting? This one?


The request body had an invalid XML body. (message: xmlns:D: 'DAV:' is not a valid URI
                , errorcode: 99, line: 2)

I don't think there's anything we can do at this point to fix it. The entire xml system got a rewrite somewhat recently, and I don't think it's worth creating a workaround for this anymore.
The regex won't help you here. If you were to apply it, the rest of the system would break because it's expecting a different namespace.

What operating system + version still ships a libxml that old? Could be interesting to know.

Evert

Rafael Alcántara

unread,
Jan 14, 2016, 2:06:05 PM1/14/16
to SabreDAV Discussion
Hi, Evert!

Thanks for replying :)
Yes, the error message is exactly that one.
The operating system seems to be CentOS 5.2, almost 8 year old... They say they cannot upgrade as the server is shared and this would affect other customers. Perhaps I should look for another provider.

Thanks again,

Rafa

Evert Pot

unread,
Jan 14, 2016, 2:15:10 PM1/14/16
to sabredav...@googlegroups.com
On 2016-01-14 02:06 PM, Rafael Alcántara wrote:
> Hi, Evert!
>
> Thanks for replying :)
> Yes, the error message is exactly that one.
> The operating system seems to be CentOS 5.2, almost 8 year old... They
> say they cannot upgrade as the server is shared and this would affect
> other customers. Perhaps I should look for another provider.

You absolutely should then. My philosophy in this stuff is that the
hosting and server should cater the application it's running, not the
other way round.

CentOS 5 is ancient though. Current version is 5.11 apparently. Running
5.2 implies that you are likely open to a large amount of security problems.

Evert
Reply all
Reply to author
Forward
0 new messages