We're talking about this line:
$server->setBaseUri('/url/to/server.php');This path needs to point exactly to the server script. To find out what this should be, try to open server.php in your browser, and simply strip off the protocol and domainname.
So if this is how you access sabredav:
http://mydomain/sabredav/server.phpThen your base url would be:
/sabredav/server.php
But of course we do not know how you have set up and what your URL is and whether you use rewriting...http://mydomain/sabredav/server.php
--