Roundcube-CardDAV
Roundcube-CardDAV copied to clipboard
Roundcube 0.9.git + calendarserver_version 2
roundcube 0.9.git and Apache/2.2.9 with PHP 5.3.10
i get a "internal server error 500" when enable plugin CardDav (0.5.1) in roundcube config. the solution:
carddav_addressbook.php
< if ($rcmail->db->num_rows($result))
---
> if ($rcmail->db->affected_rows($result))
199c199
< if ($rcmail->db->num_rows($result))
---
> if ($rcmail->db->affected_rows($result))
232c232
< return $rcmail->db->num_rows($result);
---
> return $rcmail->db->affected_rows($result);
794c794
< if ($rcmail->db->num_rows($result))
---
> if ($rcmail->db->affected_rows($result))
carddav.php
< if ($rcmail->db->num_rows($result))
---
> if ($rcmail->db->affected_rows($result))
see http://php.net/manual/de/function.mysql-affected-rows.php
Calendar and Contacts Server (http://trac.calendarserver.org)
error : 403 97 "-" "CardDAV PHP/0.5.1" i=1 or=1 t=80.1 err=propfind-finite-depth
the solution:
carddav_backend.php
212c212,222
< $response = $this->query($this->url, 'PROPFIND');
---
> $content = '<?xml version="1.0" encoding="utf-8" ?>
> <D:sync-collection xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav">
> <D:sync-token></D:sync-token>
> <D:sync-level>1</D:sync-level>
> <D:prop><D:getcontenttype/><D:getetag/><D:allprop/>
> <C:address-data><C:allprop/></C:address-data></D:prop>
> <C:filter/></D:sync-collection>';
> $content_type = 'application/xml';
> $response = $this->query($this->url, 'REPORT', $content, $content_type);
see http://tools.ietf.org/html/rfc6578#section-3.8
Dude! Your rock! So happy right now!