Invalid username or password, configured for Davical (first time)

315 views
Skip to first unread message

Imanuel Habekotte

unread,
Sep 8, 2016, 5:43:21 AM9/8/16
to AgenDAV general
These are the last entries in my log file, I don't see AgenDAV making any requests to the Davical server, the top entries are from me synchronizing the calendar in Thunderbird and adding an event to it.

davical.imanuelhab.mooo.com:80 192.168.1.75 - admin [08/Sep/2016:11:33:40 +0200] "REPORT /caldav.php/imanuel/calendar/ HTTP/1.1" 207 868 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 Lightning/4.7.2"
davical
.imanuelhab.mooo.com:80 192.168.1.75 - admin [08/Sep/2016:11:35:04 +0200] "PUT /caldav.php/imanuel/calendar/0d1655a9-0e30-46fd-832d-a449644edf32.ics HTTP/1.1" 201 517 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 Lightning/4.7.2"
davical
.imanuelhab.mooo.com:80 192.168.1.75 - admin [08/Sep/2016:11:35:09 +0200] "REPORT /caldav.php/imanuel/calendar/ HTTP/1.1" 207 1175 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 Lightning/4.7.2"
imanuelhab
.mooo.com:80 192.168.1.75 - - [08/Sep/2016:11:35:32 +0200] "POST /agendav/web/public/index.php/login HTTP/1.1" 200 1598 "http://imanuelhab.mooo.com/agendav/web/public/index.php/login" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0"
imanuelhab
.mooo.com:80 192.168.1.75 - - [08/Sep/2016:11:35:32 +0200] "GET /agendav/web/public/index.php/js_generator/prefs HTTP/1.1" 200 797 "http://imanuelhab.mooo.com/agendav/web/public/index.php/login" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0"
imanuelhab
.mooo.com:80 192.168.1.75 - - [08/Sep/2016:11:35:33 +0200] "GET /agendav/web/public/index.php/strings/load/1.2.6.2 HTTP/1.1" 200 2667 "http://imanuelhab.mooo.com/agendav/web/public/index.php/login" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0"

This is my caldav.php:

<?php
// vim: ft=php

/**********************
 * Connection options *
 **********************/


/*
 * HTTP auth method
 * ================
 *
 * Specify which HTTP authentication method does your server need. Most
 * CalDAV servers support Basic Authentication, but you should check your
 * server documentation.
 *
 * It is recommended to use a fixed value for this. If you don't set it,
 * CalDAV client will have to negotiate with server on each request and
 * perfomance will be worse (mainly when Basic auth is used)
 *
 * Possible values can be found at
 * http://www.php.net/manual/es/function.curl-setopt.php (CURLOPT_HTTPAUTH)
 *
 * Examples:
 *  Automatic guess: $config['caldav_http_auth_method'] = null;
 *  SabreDAV: $config['caldav_http_auth_method'] = CURLAUTH_DIGEST;
 *  DAViCal: $config['caldav_http_auth_method'] = CURLAUTH_BASIC;
 */


$config
['caldav_http_auth_method'] = null;


/*******************
 * CalDAV URLs     *
 *******************/


/*
 * CalDAV principal URL template
 * =============================
 *
 * %u will be replaced by an username. Please, add trailing slash
 * Some samples:
 * - DAViCal: https://host/caldav.php/%u/
 * - SabreDAV: https://host/calendarserver.php/principals/%u/
 * - Apple Calendar Server: https://host/calendars/users/%u/
 */


$config
['caldav_principal_url'] = 'http://davical.imanuelhab.mooo.com/caldav.php/%u/';

/*
 * CalDAV calendars URL template
 * =============================
 *
 * %s will be replaced by the required string depending on the context (user
 * name, username followed by a calendar or resource inside a calendar)
 * Please, add trailing slash
 * Some samples:
 * - DAViCal: https://host/caldav.php/%s/
 * - SabreDAV: https://host/calendarserver.php/calendars/%s/
 * - Apple Calendar Server: https://host/calendars/users/%s/
 */


$config
['caldav_calendar_url'] = 'http://davical.imanuelhab.mooo.com/caldav.php/%s/';

/*
 * Public CalDAV URL for calendars
 * ===============================
 *
 * %s is a placeholder for the rest of the URL (user + calendar).
 * Please, add trailing slash.
 * Will be shown to users only when 'show_public_caldav_url' is enabled
 */

$config
['public_caldav_url'] = 'http://calendar.imanuelhab.mooo.com/caldav.php/%s/';

/*******************
 * Share options   *
 *******************/


/*
 * Allow calendar sharing
 * ======================
 *
 * You can enable or disable calendar sharing. If your CalDAV server does not
 * support WebDAV ACLs disable sharing
 */


$config
['enable_calendar_sharing'] = TRUE;

// Default permissions for calendar owner
$config
['owner_permissions'] = array('all', 'read', 'unlock', 'read-acl',
               
'read-current-user-privilege-set', 'write-acl', 'C:read-free-busy',
               
'write', 'write-properties', 'write-content', 'bind', 'unbind');

// Permissions for sharing calendars using the 'read' profile
$config
['read_profile_permissions'] = array('C:read-free-busy', 'read');

// Permissions for sharing calendars using the 'read+write' profile
$config
['read_write_profile_permissions'] = array('C:read-free-busy',
               
'read', 'write');

// Authenticated users default permissions
$config
['default_permissions'] = array('C:read-free-busy');

I successfully made the AgenDAV MySQL databases and AgenDAV can connect to it, so that's all good I think.

Imanuel Habekotte

unread,
Sep 8, 2016, 5:53:00 AM9/8/16
to AgenDAV general
That was quick! I found out I had only added the two hostnames to the Windows hosts file (where Thunderbird is installed) and I forgot to do the same on the Raspberry Pi! :')

Now on to the next problem though. :) I'm getting this error when I try to log in:


               

A Database Error Occurred


               

Error Number: 1146

Table 'agendav.prefs' doesn't exist

SELECT *
FROM (`prefs`)
WHERE `username` =  'imanuel'

Filename: /media/seagate/htdocs/imanuelhab/agendav/web/application/models/userpref.php

Line Number: 35

     



Op donderdag 8 september 2016 11:43:21 UTC+2 schreef Imanuel Habekotte:
These are the last entries in my log file, I don't see AgenDAV making any requests to the Davical server, the top entries are from me synchronizing the calendar in Thunderbird and adding an event to it.
 
<snip>

Imanuel Habekotte

unread,
Sep 8, 2016, 6:22:45 AM9/8/16
to AgenDAV general
I got it working finally and I think it looks great! So this is the thing I'm planning to do with it, previously I have been working on a PHP script that generates .ics files using an iCal library by getting the school's agenda data (which is in JSON-format) and putting it in an iCalendar file. This library wasn't as flexible as I wanted it to be however, or I was over -complicating the use of it maybe, I could also simply write an .ics file by making my own script do that. Anyway, a simple script from the W3C handled PUT requests using an Apache .htaccess file and a PHP script called put.php, but the file simply gets overwritten by my own PHP script every time I put an event in the calendar manually, so here comes my next project: make my PHP script act as a CalDAV client, so that it can simply connect to my Davical server and add events that way.

So my question is: what is the best CalDAV client library for PHP? So that I can add events when they are detected by my script? :)

Thanks in advance,
Imanuel


Op donderdag 8 september 2016 11:43:21 UTC+2 schreef Imanuel Habekotte:
These are the last entries in my log file, I don't see AgenDAV making any requests to the Davical server, the top entries are from me synchronizing the calendar in Thunderbird and adding an event to it.
<snip> 

Jorge López Pérez

unread,
Sep 13, 2016, 8:15:03 AM9/13/16
to agendav...@googlegroups.com
Hi Imanuel,

On Thu, Sep 8, 2016, at 12:22, Imanuel Habekotte wrote:

> So my question is: what is the best CalDAV client library for PHP? So
> that
> I can add events when they are detected by my script? :)

Kind of off-topic, but let me give you some hints.

If you specifically need a CalDAV client, you can have a look at
sabre/dav WebDAV client (http://sabre.io/dav/davclient/) or even at
AgenDAV's internal CalDAV client, based on the former.

I'd also suggest using sabre/vobject to generate your iCalendar data.

Best regards.

--
Jorge López Pérez
http://adobo.org

Imanuel Habekotte

unread,
Sep 15, 2016, 2:41:08 AM9/15/16
to AgenDAV general
Hello Jorge,

Sorry for the late reaction! Hey that's not off-topic at all, I even tried sabre/dav, but was disappointed when I couldn't find any features related to the supposedly called Vobjects, so there is also sabre/vobject! Thanks. I'm going to try that one later today. :)

Kind regards,
Imanuel

Op dinsdag 13 september 2016 14:15:03 UTC+2 schreef Jorge Lopez:
Reply all
Reply to author
Forward
0 new messages